private function generateGetSetReferenceCallback( &$get, &$set, $reference )
    {

        // we not on the ignore list?
        if( !( $property = $this->getSetAlias( $reference, 'reference' ) ) ) {
            return;
        }

        $this->additionalProperties[] = $property;

        // DEPRECIATED Symfony2 compatible getter / setter
        // $this->addSymfonyFormCompatibleGetter( $property );
        // $this->addSymfonyFormCompatibleSetter( $property );

        $this->class->addUses('Bond\\Repository');
        $this->class->addUses( 'Bond\\Entity\\StaticMethods' );

        // get
        $getCaseStatement = explode( "\n", sprintf( <<<CASE
case '%s':
    return \$this->r()->referencesGet( \$this, '%s.%s' );\n
CASE
            ,
            $property,
            $reference[0],
            $reference[1]
        ));

        $get = array_merge( $get, $getCaseStatement );

        // set
        $setCaseStatement = explode( "\n", sprintf( <<<CASE
case '%s':
    return StaticMethods::set_references( \$this, '%s.%s', \$value );\n
CASE
            ,
            $property,
            $reference[0],
            $reference[1]
        ));

        $set = array_merge( $set, $setCaseStatement );

    }
private function generateGetSetReferenceCallback( &$get, &$set, $reference )
    {

        // we not on the ignore list?
        if( !( $property = $this->getSetAlias( $reference, 'reference' ) ) ) {
            return;
        }

        $this->additionalProperties[] = $property;

        // DEPRECIATED Symfony2 compatible getter / setter
        // $this->addSymfonyFormCompatibleGetter( $property );
        // $this->addSymfonyFormCompatibleSetter( $property );

        $this->class->addUses('Bond\\Repository');
        $this->class->addUses( 'Bond\\Entity\\StaticMethods' );

        // get
        $getCaseStatement = explode( "\n", sprintf( <<<CASE
case '%s':
    return \$this->r()->referencesGet( \$this, '%s.%s' );\n
CASE
            ,
            $property,
            $reference[0],
            $reference[1]
        ));

        $get = array_merge( $get, $getCaseStatement );

        // set
        $setCaseStatement = explode( "\n", sprintf( <<<CASE
case '%s':
    return StaticMethods::set_references( \$this, '%s.%s', \$value );\n
CASE
            ,
            $property,
            $reference[0],
            $reference[1]
        ));

        $set = array_merge( $set, $setCaseStatement );

    }
private function generateGetSetReferenceCallback ( & $ get , & $ set , $ reference ) { // we not on the ignore list? if ( ! ( $ property = $ this -> getSetAlias ( $ reference , 'reference' ) ) ) { return ; } $ this -> additionalProperties [ ] = $ property ; // DEPRECIATED Symfony2 compatible getter / setter // $this->addSymfonyFormCompatibleGetter( $property ); // $this->addSymfonyFormCompatibleSetter( $property ); $ this -> class -> addUses ( 'Bond\\Repository' ) ; $ this -> class -> addUses ( 'Bond\\Entity\\StaticMethods' ) ; // get $ getCaseStatement = explode ( "\n" , sprintf (  <<<CASE
case '%s':
    return \$this->r()->referencesGet( \$this, '%s.%s' );\n
CASE , $ property , $ reference [ 0 ] , $ reference [ 1 ] ) ) ; $ get = array_merge ( $ get , $ getCaseStatement ) ; // set $ setCaseStatement = explode ( "\n" , sprintf (  <<<CASE
case '%s':
    return StaticMethods::set_references( \$this, '%s.%s', \$value );\n
CASE , $ property , $ reference [ 0 ] , $ reference [ 1 ] ) ) ; $ set = array_merge ( $ set , $ setCaseStatement ) ; }
References to foreign entities in a 1->1 or 1->many way.
Think, Contact -> ContactUser or Contact -> Addresses

@param array $get
@param array $set
@param $reference See, Relation->getReferences()
References to foreign entities in a 1 - > 1 or 1 - > many way . Think Contact - > ContactUser or Contact - > Addresses