Esempio n. 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');
 }
Esempio n. 2
0
 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;
 }