public function filter(\Closure $cClosure)
    {
        $sClassName      = get_class($this);
        $aFilteredValues = array();
        foreach ($this->values as $sKey => $mValue) {
            if (true === $cClosure($mValue, $sKey)) {
                $aFilteredValues[$sKey] = $mValue;
            }
        }

        return new $sClassName($aFilteredValues);
    }
public function filter(\Closure $cClosure)
    {
        $sClassName      = get_class($this);
        $aFilteredValues = array();
        foreach ($this->values as $sKey => $mValue) {
            if (true === $cClosure($mValue, $sKey)) {
                $aFilteredValues[$sKey] = $mValue;
            }
        }

        return new $sClassName($aFilteredValues);
    }
public function filter ( \ Closure $ cClosure ) { $ sClassName = get_class ( $ this ) ; $ aFilteredValues = array ( ) ; foreach ( $ this -> values as $ sKey => $ mValue ) { if ( true === $ cClosure ( $ mValue , $ sKey ) ) { $ aFilteredValues [ $ sKey ] = $ mValue ; } } return new $ sClassName ( $ aFilteredValues ) ; }
Filters the current values and return a new collection

@param \Closure $cClosure

@return AbstractCollection
Filters the current values and return a new collection