public function pushAncestor($ancestor)
    {
        if (is_string($ancestor)) {
            $ancestor = new $ancestor;
        }
        if (!$ancestor instanceof AncestorCriteriaInterface) {
            throw new RepositoryException("Class " . get_class($ancestor) . " must be an instance of Aruberuto\\Repository\\Contracts\\AncestorCriteriaInterface");
        }
        $this->ancestor->push($ancestor);

        return $this;
    }
public function pushAncestor($ancestor)
    {
        if (is_string($ancestor)) {
            $ancestor = new $ancestor;
        }
        if (!$ancestor instanceof AncestorCriteriaInterface) {
            throw new RepositoryException("Class " . get_class($ancestor) . " must be an instance of Aruberuto\\Repository\\Contracts\\AncestorCriteriaInterface");
        }
        $this->ancestor->push($ancestor);

        return $this;
    }
public function pushAncestor ( $ ancestor ) { if ( is_string ( $ ancestor ) ) { $ ancestor = new $ ancestor ; } if ( ! $ ancestor instanceof AncestorCriteriaInterface ) { throw new RepositoryException ( "Class " . get_class ( $ ancestor ) . " must be an instance of Aruberuto\\Repository\\Contracts\\AncestorCriteriaInterface" ) ; } $ this -> ancestor -> push ( $ ancestor ) ; return $ this ; }
Push Ancestor for filter the query

@param $ancestor

@return $this
@throws \Aruberuto\Repository\Exceptions\RepositoryException
Push Ancestor for filter the query