Core/Collection/Collection.php
public function filter($closure) {
        $collection = new Collection();

        foreach ($this->_datas as $data) {
            if ($closure($data)) {
                $collection->add($data);
            }
        }

        return $collection;
    }
public function filter($closure) {
        $collection = new Collection();

        foreach ($this->_datas as $data) {
            if ($closure($data)) {
                $collection->add($data);
            }
        }

        return $collection;
    }
public function filter ( $ closure ) { $ collection = new Collection ( ) ; foreach ( $ this -> _datas as $ data ) { if ( $ closure ( $ data ) ) { $ collection -> add ( $ data ) ; } } return $ collection ; }
Filter the collection with a closure
@access public
@param $closure callable
@return Collection
@since 3.0
@package Gcs\Framework\Core\Collecion
Filter the collection with a closure