protected static function _defineRelationships()
    {
        $className = get_called_class();
        $classes = class_parents($className);
        array_unshift($classes, $className);
        static::$_classRelationships[$className] = [];
        while ($class = array_pop($classes)) {
            if (!empty($class::$relationships)) {
                static::$_classRelationships[$className] = array_merge(static::$_classRelationships[$className], $class::$relationships);
            }
            if (static::isVersioned() && !empty($class::$versioningRelationships)) {
                static::$_classRelationships[$className] = array_merge(static::$_classRelationships[$className], $class::$versioningRelationships);
            }
        }
    }
protected static function _defineRelationships()
    {
        $className = get_called_class();
        $classes = class_parents($className);
        array_unshift($classes, $className);
        static::$_classRelationships[$className] = [];
        while ($class = array_pop($classes)) {
            if (!empty($class::$relationships)) {
                static::$_classRelationships[$className] = array_merge(static::$_classRelationships[$className], $class::$relationships);
            }
            if (static::isVersioned() && !empty($class::$versioningRelationships)) {
                static::$_classRelationships[$className] = array_merge(static::$_classRelationships[$className], $class::$versioningRelationships);
            }
        }
    }
protected static function _defineRelationships ( ) { $ className = get_called_class ( ) ; $ classes = class_parents ( $ className ) ; array_unshift ( $ classes , $ className ) ; static :: $ _classRelationships [ $ className ] = [ ] ; while ( $ class = array_pop ( $ classes ) ) { if ( ! empty ( $ class :: $ relationships ) ) { static :: $ _classRelationships [ $ className ] = array_merge ( static :: $ _classRelationships [ $ className ] , $ class :: $ relationships ) ; } if ( static :: isVersioned ( ) && ! empty ( $ class :: $ versioningRelationships ) ) { static :: $ _classRelationships [ $ className ] = array_merge ( static :: $ _classRelationships [ $ className ] , $ class :: $ versioningRelationships ) ; } } }
Called when anything relationships related is used for the first time to define relationships before _initRelationships
Called when anything relationships related is used for the first time to define relationships before _initRelationships