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.
         }
     }
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function applyOptions(array $args)
 {
     $this->keyword = $args[0];
     $this->classname = Model::generateClassName($this->keyword);
 }
Пример #3
0
 /**
  * @expectedException        Exception
  */
 public function testInvalidModel()
 {
     Model::factory("I_dont_exist");
 }