public static function all($page = 1, $per_page = 10)
    {
        $categories = self::get(
            "/categories",
            ['query' => ['page' => $page, 'per_page' => $per_page]]
        );

        $categoriesArray = self::getArray($categories->getBody(), get_called_class());

        return new ArrayObject($categoriesArray, $categories->getHeaders());
    }
public static function all($page = 1, $per_page = 10)
    {
        $categories = self::get(
            "/categories",
            ['query' => ['page' => $page, 'per_page' => $per_page]]
        );

        $categoriesArray = self::getArray($categories->getBody(), get_called_class());

        return new ArrayObject($categoriesArray, $categories->getHeaders());
    }
public static function all ( $ page = 1 , $ per_page = 10 ) { $ categories = self :: get ( "/categories" , [ 'query' => [ 'page' => $ page , 'per_page' => $ per_page ] ] ) ; $ categoriesArray = self :: getArray ( $ categories -> getBody ( ) , get_called_class ( ) ) ; return new ArrayObject ( $ categoriesArray , $ categories -> getHeaders ( ) ) ; }
Retrieve all the categories on a specific page.
Returns an ArrayObject that contains Category objects.

@param integer $page Page from which the categories need to be retrieved
@param integer $per_page Number of elements on a page
@return ArrayObject of Category objects.
@deprecated
@see Collection::all()
Retrieve all the categories on a specific page . Returns an ArrayObject that contains Category objects .