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'); }
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; }