protected function checkDocHints($docComment, $model)
    {
        // Check if we never follow this relation
        if (preg_match('/@follow\s+NEVER/', $docComment)) return false;

        // Check if we follow the relation from the 'base' model
        if (preg_match('/@follow\s+UNLESS\s+' . str_replace('\\', '\\\\', get_class($model)) . '\b/', $docComment))
        {
            return false;
        }

        if (preg_match('/@follow\s+FROM\b/', $docComment) && !preg_match('/@follow\s+FROM\s+' . str_replace('\\', '\\\\', get_class($model)) . '\b/', $docComment))
        {
            return false;
        }

        // We follow the relation
        return true;
    }
protected function checkDocHints($docComment, $model)
    {
        // Check if we never follow this relation
        if (preg_match('/@follow\s+NEVER/', $docComment)) return false;

        // Check if we follow the relation from the 'base' model
        if (preg_match('/@follow\s+UNLESS\s+' . str_replace('\\', '\\\\', get_class($model)) . '\b/', $docComment))
        {
            return false;
        }

        if (preg_match('/@follow\s+FROM\b/', $docComment) && !preg_match('/@follow\s+FROM\s+' . str_replace('\\', '\\\\', get_class($model)) . '\b/', $docComment))
        {
            return false;
        }

        // We follow the relation
        return true;
    }
protected function checkDocHints ( $ docComment , $ model ) { // Check if we never follow this relation if ( preg_match ( '/@follow\s+NEVER/' , $ docComment ) ) return false ; // Check if we follow the relation from the 'base' model if ( preg_match ( '/@follow\s+UNLESS\s+' . str_replace ( '\\' , '\\\\' , get_class ( $ model ) ) . '\b/' , $ docComment ) ) { return false ; } if ( preg_match ( '/@follow\s+FROM\b/' , $ docComment ) && ! preg_match ( '/@follow\s+FROM\s+' . str_replace ( '\\' , '\\\\' , get_class ( $ model ) ) . '\b/' , $ docComment ) ) { return false ; } // We follow the relation return true ; }
Inspect the relation method annotations to see if we need to follow the relation

@param string $docComment
@param        $model
@return bool
Inspect the relation method annotations to see if we need to follow the relation