for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the pexels-library package.
*
* (c) 2019 WEBEWEB
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Library\Pexels\Model\Request;
use WBW\Library\Core\Model\Attribute\StringQueryTrait;
use WBW\Library\Pexels\Model\AbstractRequest;
use WBW\Library\Pexels\Model\Attribute\IntegerPageTrait;
use WBW\Library\Pexels\Model\Attribute\IntegerPerPageTrait;
/**
* Search photos request.
* @author webeweb <https://github.com/webeweb/>
* @package WBW\Library\Pexels\Model\Request
class SearchPhotosRequest extends AbstractRequest {
use IntegerPageTrait;
use IntegerPerPageTrait;
use StringQueryTrait;
* Search photos resource path.
* @var string
const SEARCH_PHOTOS_RESOURCE_PATH = "/v1/search";
* Locale.
private $locale;
* Get the locale.
* @return string Returns the locale.
public function getLocale() {
return $this->locale;
}
* Set the locale.
* @param string $locale The locale.
* @return SearchPhotosRequest Returns this search photos request.
public function setLocale($locale) {
$this->locale = $locale;
return $this;
* Constructor.
public function __construct() {
parent::__construct();
$this->setPage(1);
$this->setPerPage(self::PER_PAGE_DEFAULT);
* {@inheritDoc}
public function getResourcePath() {
return self::SEARCH_PHOTOS_RESOURCE_PATH;