library/Garp/Spawn/Model/Binding/Factory.php
protected function _getRules() {
        $relation = $this->getRelation();
        $localModel = $relation->getLocalModel();

        $hasNameConflict = $relation->name === $localModel->id;
        if ($hasNameConflict) {
            return array($relation->name . '1', $relation->name . '2');
        }

        $modelIds = $this->_getModelIdsAlphabetically();

        $rules = array($relation->name, $this->_getSecondRule());
        $rules = $this->_sortRulesEgocentrically($rules);

        return $rules;
    }
protected function _getRules() {
        $relation = $this->getRelation();
        $localModel = $relation->getLocalModel();

        $hasNameConflict = $relation->name === $localModel->id;
        if ($hasNameConflict) {
            return array($relation->name . '1', $relation->name . '2');
        }

        $modelIds = $this->_getModelIdsAlphabetically();

        $rules = array($relation->name, $this->_getSecondRule());
        $rules = $this->_sortRulesEgocentrically($rules);

        return $rules;
    }
protected function _getRules ( ) { $ relation = $ this -> getRelation ( ) ; $ localModel = $ relation -> getLocalModel ( ) ; $ hasNameConflict = $ relation -> name === $ localModel -> id ; if ( $ hasNameConflict ) { return array ( $ relation -> name . '1' , $ relation -> name . '2' ) ; } $ modelIds = $ this -> _getModelIdsAlphabetically ( ) ; $ rules = array ( $ relation -> name , $ this -> _getSecondRule ( ) ) ; $ rules = $ this -> _sortRulesEgocentrically ( $ rules ) ; return $ rules ; }
Returns relation rules, sorted egocentrically.
@return Array First rule refers to the model itself, second to the related model referenced in the $relation object.
Returns relation rules sorted egocentrically .