コード例 #1
0
 public function testGetTagFromClass()
 {
     $this->assertEmpty(AnnotationReader::getClassValue($this->class, 'notatag'));
     $this->assertEmpty(AnnotationReader::getClassValue($this->class, 'nonexisting'));
     $this->assertEmpty(AnnotationReader::getClassValue($this->class, 'tagwithoutvalue'));
     $this->assertEquals(AnnotationReader::getClassValue($this->class, 'tagwithvalue'), 'value');
 }
コード例 #2
0
ファイル: AbstractModel.php プロジェクト: itarato/micmod
 private function getTable()
 {
     $class = get_class($this);
     $table = AnnotationReader::getClassValue($class, 'table');
     if (!$table) {
         throw new ModelException('Missing @table definition on class: ' . $class);
     }
     return $table;
 }