예제 #1
0
파일: CoreTest.php 프로젝트: Konro1/pms
 /**
  * Tests Jam::register()
  *
  * @dataProvider provider_register
  */
 public function test_register($model, $expected)
 {
     $this->assertSame(Jam::register($model), $expected);
 }
예제 #2
0
파일: Jam.php 프로젝트: Konro1/pms
 /**
  * Gets a particular set of metadata about a model. If the model
  * isn't registered, it will attempt to register it.
  *
  * FALSE is returned on failure.
  *
  * @param   string|Jam_Model  $model
  * @return  Jam_Meta
  */
 public static function meta($model)
 {
     $model = Jam::model_name($model);
     if (!isset(Jam::$_models[$model])) {
         if (!Jam::register($model)) {
             return FALSE;
         }
     }
     return Jam::$_models[$model];
 }