public static function photos($search, $page = 1, $per_page = 10, $orientation = null, $collections = null)
    {
        $query = [
            'query' => $search,
            'page' => $page,
            'per_page' => $per_page
        ];

        if ( ! empty($orientation)) {
            $query['orientation'] = $orientation;
        }

        if ( ! empty($collections)) {
            $query['collections'] = $collections;
        }

        $photos = self::get(
            "/search/photos",
            [ 'query' => $query ]
        );

        return self::getPageResult($photos->getBody(), $photos->getHeaders(), Photo::class);
    }
public static function photos($search, $page = 1, $per_page = 10, $orientation = null, $collections = null)
    {
        $query = [
            'query' => $search,
            'page' => $page,
            'per_page' => $per_page
        ];

        if ( ! empty($orientation)) {
            $query['orientation'] = $orientation;
        }

        if ( ! empty($collections)) {
            $query['collections'] = $collections;
        }

        $photos = self::get(
            "/search/photos",
            [ 'query' => $query ]
        );

        return self::getPageResult($photos->getBody(), $photos->getHeaders(), Photo::class);
    }
public static function photos ( $ search , $ page = 1 , $ per_page = 10 , $ orientation = null , $ collections = null ) { $ query = [ 'query' => $ search , 'page' => $ page , 'per_page' => $ per_page ] ; if ( ! empty ( $ orientation ) ) { $ query [ 'orientation' ] = $ orientation ; } if ( ! empty ( $ collections ) ) { $ query [ 'collections' ] = $ collections ; } $ photos = self :: get ( "/search/photos" , [ 'query' => $ query ] ) ; return self :: getPageResult ( $ photos -> getBody ( ) , $ photos -> getHeaders ( ) , Photo :: class ) ; }
Retrieve a single page of photo results depending on search results
Returns ArrayObject that contain PageResult object.

@param  string  $search       Search terms.
@param  integer $page         Page number to retrieve. (Optional; default: 1)
@param  integer $per_page     Number of items per page. (Optional; default: 10)
@param  string  $orientation  Filter search results by photo orientation. Valid values are landscape,
portrait, and squarish. (Optional)
@param  string  $collections  Collection ID(‘s) to narrow search. If multiple, comma-separated. (Optional)
@return PageResult
Retrieve a single page of photo results depending on search results Returns ArrayObject that contain PageResult object .