/** * Overides Shell::_loadModels, and builds the $uses array with Models. */ function _loadModels() { $folder = new Folder(MODELS); list($dirs, $models) = $folder->read(); foreach ($models as $model) { $this->uses[] = Inflector::classify(preg_replace("/\\.php\$/", "", $model)); } if (empty($this->uses)) { return false; } return parent::_loadModels(); }