src/Collection.php
public function each($callback)
    {
        foreach ($this->_data as $key => $val) {
            $this->_data[$key] = $callback($val, $key, $this);
        }
        return $this;
    }
public function each($callback)
    {
        foreach ($this->_data as $key => $val) {
            $this->_data[$key] = $callback($val, $key, $this);
        }
        return $this;
    }
public function each ( $ callback ) { foreach ( $ this -> _data as $ key => $ val ) { $ this -> _data [ $ key ] = $ callback ( $ val , $ key , $ this ) ; } return $ this ; }
Applies a callback to all items in the collection.

@param  callback $callback The callback to apply.
@return object             This collection instance.
Applies a callback to all items in the collection .