芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/cms.mgaplay.com.br/lib/Event/TemplateProviderEvent.php
. */ namespace Xibo\Event; use Xibo\Entity\SearchResult; use Xibo\Entity\SearchResults; /** * TemplateProviderEvent */ class TemplateProviderEvent extends Event { protected static $NAME = 'connector.provider.template'; /** @var \Xibo\Entity\SearchResults */ private $results; /** * @var int */ private $start; /** * @var int */ private $length; /** @var string|null */ private $search; /** * @param \Xibo\Entity\SearchResults $results * @param int $start * @param int $length */ public function __construct(SearchResults $results, int $start, int $length, ?string $search) { $this->results = $results; $this->start = $start; $this->length = $length; $this->search = $search; } /** * @param SearchResult $result * @return $this */ public function addResult(SearchResult $result): TemplateProviderEvent { $this->results->data[] = $result; return $this; } /** * @return SearchResults */ public function getResults(): SearchResults { return $this->results; } /** * Get starting record * @return int */ public function getStart(): int { return $this->start; } /** * Get number of records to return * @return int */ public function getLength(): int { return $this->length; } /** * @return string|null */ public function getSearch(): ?string { return $this->search; } }