function __construct(Search $search) { Validation::notEmpty($search, 'search'); $this->search = $search; $this->search->register($this); }