Ouzo\Db\RelationToFetch::equalsPredicate PHP Method

equalsPredicate() public static method

public static equalsPredicate ( RelationToFetch $other )
$other RelationToFetch
    public static function equalsPredicate(RelationToFetch $other)
    {
        return function (RelationToFetch $relationToFetch) use($other) {
            return $relationToFetch->equals($other);
        };
    }

Usage Example

示例#1
0
 private function isAlreadyAddedToFetch(RelationToFetch $relationToFetch)
 {
     return Arrays::any($this->_relationsToFetch, RelationToFetch::equalsPredicate($relationToFetch));
 }