/** * Executes stacked finders and returns the results. * `Model::find()` and the after states of the finders are executed at this time. * * @return array */ public function exec() { $options = $this->options->getOptions(); $results = $this->model->find('all', $options); foreach ($this->stack as $method) { $results = $this->model->dispatchMethod($method, array('after', $options, $results)); } return $results; }