schema() public static méthode

Returns the Schema registered for this class.
public static schema ( ) : Schema
Résultat Schema
Exemple #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());
 }
Exemple #2
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'), 'type' => new Types\StringType(128), 'isllama' => new Types\BooleanType(array('default' => true)), 'weight' => new Types\DecimalType(5, 1), 'timecreated' => new Types\DateTimeType(), 'unixtime' => new Types\UnixTimestampType(), 'camelidvariant' => new Types\StringType(128, array('allowed' => array('llama', 'alpaca')))));
     });
     // set up tables
     $this->pheasant->register('Pheasant\\DomainObject', new RowMapper('domainobject'));
     $this->migrate('domainobject', DomainObject::schema());
 }