html; } } interface PageBuilder { public function setFeed(); public function setPaginator(); // ... другие методы для установки свойств public function build(); } //implements PageBuilder { class MusicPageBuilder implements PageBuilder { private Page $page; const LIMIT = 5; const OFFSET = 0; private $data = []; private $limit = Null; private $offset = Null; private $flag = 'ajax'; public function __construct($data, $flag = 'ajax' ) { $this->page = new Page(); $this->flag = $flag; $this->data = $data; $this->limit = isset($_GET['limit'])? $_GET['limit'] : self::LIMIT; $this->offset = isset($_GET['offset']) ? $_GET['offset']: self::OFFSET; } public function setFeed(){ $portial = array_slice($this->data, $this->offset, $this->limit); $this->page->feed ='