protected static function _initRelationships()
    {
        $className = get_called_class();
        if (!empty(static::$_classRelationships[$className])) {
            $relationships = [];
            foreach (static::$_classRelationships[$className] as $relationship => $options) {
                if (is_array($options)) {
                    $relationships[$relationship] = static::_initRelationship($relationship, $options);
                }
            }
            static::$_classRelationships[$className] = $relationships;
        }
    }
protected static function _initRelationships()
    {
        $className = get_called_class();
        if (!empty(static::$_classRelationships[$className])) {
            $relationships = [];
            foreach (static::$_classRelationships[$className] as $relationship => $options) {
                if (is_array($options)) {
                    $relationships[$relationship] = static::_initRelationship($relationship, $options);
                }
            }
            static::$_classRelationships[$className] = $relationships;
        }
    }
protected static function _initRelationships ( ) { $ className = get_called_class ( ) ; if ( ! empty ( static :: $ _classRelationships [ $ className ] ) ) { $ relationships = [ ] ; foreach ( static :: $ _classRelationships [ $ className ] as $ relationship => $ options ) { if ( is_array ( $ options ) ) { $ relationships [ $ relationship ] = static :: _initRelationship ( $ relationship , $ options ) ; } } static :: $ _classRelationships [ $ className ] = $ relationships ; } }
Called after _defineRelationships to initialize and apply defaults to the relationships property
Must be idempotent as it may be applied multiple times up the inheritence chain
Called after _defineRelationships to initialize and apply defaults to the relationships property Must be idempotent as it may be applied multiple times up the inheritence chain