lithium\data\Entity::model PHP Method

model() public method

Returns the model which this entity is bound to.
public model ( ) : string
return string The fully qualified model class name.
    public function model()
    {
        return $this->_model;
    }

Usage Example

Example #1
0
 public function testPropertyAccess()
 {
     $entity = new Entity(array('model' => 'lithium\\tests\\mocks\\data\\MockPost', 'exists' => false));
     $this->assertEqual('lithium\\tests\\mocks\\data\\MockPost', $entity->model());
     $this->assertFalse($entity->exists());
     $entity = new Entity(array('exists' => true));
     $this->assertTrue($entity->exists());
     $expected = array('exists' => true, 'data' => array(), 'update' => array(), 'increment' => array());
     $this->assertEqual($expected, $entity->export());
 }