private function batchModelFileRegistrationAttempt($files = array()) { foreach ($files as $filename) { try { $potentialClassName = basename(substr($filename, 0, -4)); $model = Model::factory($potentialClassName); $this->attemptRuleExtraction($model); } catch (Exception $e) { // falure only means its not a Strata model. } } }
/** * {@inheritdoc} */ public function applyOptions(array $args) { $this->keyword = $args[0]; $this->classname = Model::generateClassName($this->keyword); }
/** * @expectedException Exception */ public function testInvalidModel() { Model::factory("I_dont_exist"); }