protected function sortRelationshipsByType()
    {
        $entityClass = $this->getClass();

        // Instantiate a dummy entity which we will pass to relationship methods.
        $entity = unserialize(sprintf('O:%d:"%s":0:{}', strlen($entityClass), $entityClass));

        foreach ($this->relationships as $relation) {
            $this->$relation($entity);
        }
    }
protected function sortRelationshipsByType()
    {
        $entityClass = $this->getClass();

        // Instantiate a dummy entity which we will pass to relationship methods.
        $entity = unserialize(sprintf('O:%d:"%s":0:{}', strlen($entityClass), $entityClass));

        foreach ($this->relationships as $relation) {
            $this->$relation($entity);
        }
    }
protected function sortRelationshipsByType ( ) { $ entityClass = $ this -> getClass ( ) ; // Instantiate a dummy entity which we will pass to relationship methods. $ entity = unserialize ( sprintf ( 'O:%d:"%s":0:{}' , strlen ( $ entityClass ) , $ entityClass ) ) ; foreach ( $ this -> relationships as $ relation ) { $ this -> $ relation ( $ entity ) ; } }
Sort Relationships methods by type.

TODO : replace this by directly setting these value
in the corresponding methods, so we won't need
the correspondency table

@return void
Sort Relationships methods by type .