public function getData($order = self::SORT_DESC)
    {
        return array(
            'items' => array_map(
                function (Item $item) {
                    /*
                     * @var Item $item
                     */
                    return $item->toArray();
                },
                array_values($this->getItems($order))
            ),
        );
    }
public function getData($order = self::SORT_DESC)
    {
        return array(
            'items' => array_map(
                function (Item $item) {
                    /*
                     * @var Item $item
                     */
                    return $item->toArray();
                },
                array_values($this->getItems($order))
            ),
        );
    }
public function getData ( $ order = self :: SORT_DESC ) { return array ( 'items' => array_map ( function ( Item $ item ) { /*
                     * @var Item $item
                     */ return $ item -> toArray ( ) ; } , array_values ( $ this -> getItems ( $ order ) ) ) , ) ; }
Get data in array format.

@param int $order

@return array
Get data in array format .