Пример #1
0
 /**
  * Constructor.
  * @param mixed $modelClass the model class (e.g. 'Post') or the model finder instance
  * (e.g. <code>Post::model()</code>, <code>Post::model()->published()</code>).
  * @param array $config configuration (name=>value) to be applied as the initial property values of this class.
  * @since v1.0
  */
 public function __construct($modelClass, $config = [])
 {
     $this->configure($modelClass, $config);
     $this->finder = Finder::create($this->getModel());
 }
Пример #2
0
 /**
  * Get finder instance
  * @return FinderInterface
  */
 private function _getFinder()
 {
     if (null === $this->_finder) {
         $this->_finder = Finder::create($this);
     }
     return $this->_finder;
 }