Pheasant\DomainObject::schema PHP Method

schema() public static method

Returns the Schema registered for this class.
public static schema ( ) : Schema
return Schema
    public static function schema()
    {
        return Pheasant::instance()->schema(isset($this) ? $this : get_called_class());
    }

Usage Example

Example #1
0
 public function setUp()
 {
     parent::setUp();
     // set up a domain object
     $this->initialize('Pheasant\\DomainObject', function ($builder) {
         $builder->properties(array('id' => new Types\IntegerType(null, 'primary auto_increment'), 'value' => new Types\StringType()));
     });
     // set up tables
     $this->pheasant->register('Pheasant\\DomainObject', new RowMapper('domainobject'));
     $this->migrate('domainobject', DomainObject::schema());
 }
All Usage Examples Of Pheasant\DomainObject::schema