src/BaseRepository.php
public function pushCriteriaOnce(CriteriaInterface $criteria, $key = null)
    {
        if (is_null($key)) {

            $this->onceCriteria->push($criteria);
            return $this;
        }

        // set/override by key
        $this->onceCriteria->put($key, $criteria);

        return $this;
    }
public function pushCriteriaOnce(CriteriaInterface $criteria, $key = null)
    {
        if (is_null($key)) {

            $this->onceCriteria->push($criteria);
            return $this;
        }

        // set/override by key
        $this->onceCriteria->put($key, $criteria);

        return $this;
    }
public function pushCriteriaOnce ( CriteriaInterface $ criteria , $ key = null ) { if ( is_null ( $ key ) ) { $ this -> onceCriteria -> push ( $ criteria ) ; return $ this ; } // set/override by key $ this -> onceCriteria -> put ( $ key , $ criteria ) ; return $ this ; }
Pushes Criteria, but only for the next call, resets to default afterwards
Note that this does NOT work for specific criteria exclusively, it resets
to default for ALL Criteria.

@param  CriteriaInterface $criteria
@param  string            $key
@return $this
Pushes Criteria but only for the next call resets to default afterwards Note that this does NOT work for specific criteria exclusively it resets to default for ALL Criteria .