public function each($method)
    {
        foreach ($this as $rec) {
            if (is_string($method)) {
                $rec->$method();
            } elseif (is_callable($method)) {
                call_user_func($method, $rec);
            }
        }

        return $this;
    }
public function each($method)
    {
        foreach ($this as $rec) {
            if (is_string($method)) {
                $rec->$method();
            } elseif (is_callable($method)) {
                call_user_func($method, $rec);
            }
        }

        return $this;
    }
public function each ( $ method ) { foreach ( $ this as $ rec ) { if ( is_string ( $ method ) ) { $ rec -> $ method ( ) ; } elseif ( is_callable ( $ method ) ) { call_user_func ( $ method , $ rec ) ; } } return $ this ; }
Executes specified method or callback for each record in DataSet.

@param string|callable $method

@return $this
Executes specified method or callback for each record in DataSet .