src/BaseRepository.php
public function pushCriteria(CriteriaInterface $criteria, $key = null)
    {
        // standard bosnadev behavior
        if (is_null($key)) {

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

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

        return $this;
    }
public function pushCriteria(CriteriaInterface $criteria, $key = null)
    {
        // standard bosnadev behavior
        if (is_null($key)) {

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

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

        return $this;
    }
public function pushCriteria ( CriteriaInterface $ criteria , $ key = null ) { // standard bosnadev behavior if ( is_null ( $ key ) ) { $ this -> criteria -> push ( $ criteria ) ; return $ this ; } // set/override by key $ this -> criteria -> put ( $ key , $ criteria ) ; return $ this ; }
Pushes Criteria, optionally by identifying key
If a criteria already exists for the key, it is overridden

Note that this does NOT overrule any onceCriteria, even if set by key!

@param  CriteriaInterface $criteria
@param  string            $key       unique identifier to store criteria as
this may be used to remove and overwrite criteria
empty for normal automatic numeric key
@return $this
Pushes Criteria optionally by identifying key If a criteria already exists for the key it is overridden