library/Garp/Model/Db.php
public function getBindingModelName($theOtherModel) {
        if (!$theOtherModel instanceof Garp_Model_Db) {
            $theOtherModel = new $theOtherModel();
        }
        $modelNames = array(
            $this->getNameWithoutNamespace(),
            $theOtherModel->getNameWithoutNamespace()
        );
        sort($modelNames);
        $namespace = 'Model_';

        // The following makes sure the namespace used is the same as that of
        // the given models, but only if they both use the same namespace.
        $thisNamespace = $this->getNamespace();
        $theOtherNamespace = $theOtherModel->getNamespace();
        if ($thisNamespace === $theOtherNamespace && $thisNamespace !== 'Model') {
            $namespace = $thisNamespace . '_Model_';
        }
        $bindingModelName = $namespace . implode('', $modelNames);
        return $bindingModelName;
    }
public function getBindingModelName($theOtherModel) {
        if (!$theOtherModel instanceof Garp_Model_Db) {
            $theOtherModel = new $theOtherModel();
        }
        $modelNames = array(
            $this->getNameWithoutNamespace(),
            $theOtherModel->getNameWithoutNamespace()
        );
        sort($modelNames);
        $namespace = 'Model_';

        // The following makes sure the namespace used is the same as that of
        // the given models, but only if they both use the same namespace.
        $thisNamespace = $this->getNamespace();
        $theOtherNamespace = $theOtherModel->getNamespace();
        if ($thisNamespace === $theOtherNamespace && $thisNamespace !== 'Model') {
            $namespace = $thisNamespace . '_Model_';
        }
        $bindingModelName = $namespace . implode('', $modelNames);
        return $bindingModelName;
    }
public function getBindingModelName ( $ theOtherModel ) { if ( ! $ theOtherModel instanceof Garp_Model_Db ) { $ theOtherModel = new $ theOtherModel ( ) ; } $ modelNames = array ( $ this -> getNameWithoutNamespace ( ) , $ theOtherModel -> getNameWithoutNamespace ( ) ) ; sort ( $ modelNames ) ; $ namespace = 'Model_' ; // The following makes sure the namespace used is the same as that of // the given models, but only if they both use the same namespace. $ thisNamespace = $ this -> getNamespace ( ) ; $ theOtherNamespace = $ theOtherModel -> getNamespace ( ) ; if ( $ thisNamespace === $ theOtherNamespace && $ thisNamespace !== 'Model' ) { $ namespace = $ thisNamespace . '_Model_' ; } $ bindingModelName = $ namespace . implode ( '' , $ modelNames ) ; return $ bindingModelName ; }
Get bindingModel name

@param string|Garp_Model_Db $theOtherModel
@return string
Get bindingModel name