本文整理匯總了PHP中Propel\Generator\Model\Column::setDescription方法的典型用法代碼示例。如果您正苦於以下問題:PHP Column::setDescription方法的具體用法?PHP Column::setDescription怎麽用?PHP Column::setDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Propel\Generator\Model\Column
的用法示例。
在下文中一共展示了Column::setDescription方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetColumnDDLComment
public function testGetColumnDDLComment()
{
$column = new Column('foo');
$column->getDomain()->copy($this->getPlatform()->getDomainForType('INTEGER'));
$column->setDescription('This is column Foo');
$expected = '`foo` INTEGER COMMENT \'This is column Foo\'';
$this->assertEquals($expected, $this->getPlatform()->getColumnDDL($column));
}
示例2: testSetDescription
public function testSetDescription()
{
$column = new Column();
$column->setDescription('Some description');
$this->assertSame('Some description', $column->getDescription());
}
示例3: Column
$column11->setAutoIncrement();
$column11->setNotNull();
$column11->setPrimaryKey();
$column12 = new Column('author_id', 'smallint', 3);
$column12->setNotNull();
$column13 = new Column('category_id', 'tinyint', 2);
$column13->setNotNull();
$column14 = new Column('title', 'varchar', 100);
$column14->setNotNull();
$column15 = new Column('body', 'clob');
$column16 = new Column('average_rating', 'float', 2);
$column16->setScale(2);
$column16->setDescription('The post rating in percentage');
$column17 = new Column('price_without_decimal_places', 'DECIMAL', 10);
$column17->setScale(0);
$column17->setDescription('The Price without decimal places');
$column21 = new Column('id', 'smallint', 3);
$column21->setAutoIncrement();
$column21->setNotNull();
$column21->setPrimaryKey();
$column22 = new Column('username', 'varchar', 15);
$column22->setNotNull();
$column23 = new Column('password', 'varchar', 40);
$column23->setNotNull();
$column31 = new Column('id', 'tinyint', 2);
$column31->setAutoIncrement();
$column31->setNotNull();
$column31->setPrimaryKey();
$column32 = new Column('name', 'varchar', 40);
$column32->setNotNull();
$column41 = new Column('id', 'integer', 7);
示例4: Column
use Propel\Generator\Platform\MysqlPlatform;
/* Columns */
$column11 = new Column('id', 'integer', 7);
$column11->setAutoIncrement();
$column11->setNotNull();
$column11->setPrimaryKey();
$column12 = new Column('author_id', 'smallint', 3);
$column12->setNotNull();
$column13 = new Column('category_id', 'tinyint', 2);
$column13->setNotNull();
$column14 = new Column('title', 'varchar', 100);
$column14->setNotNull();
$column15 = new Column('body', 'clob');
$column16 = new Column('average_rating', 'float', 2);
$column16->setScale(2);
$column16->setDescription('The post rating in percentage');
$column21 = new Column('id', 'smallint', 3);
$column21->setAutoIncrement();
$column21->setNotNull();
$column21->setPrimaryKey();
$column22 = new Column('username', 'varchar', 15);
$column22->setNotNull();
$column23 = new Column('password', 'varchar', 40);
$column23->setNotNull();
$column31 = new Column('id', 'tinyint', 2);
$column31->setAutoIncrement();
$column31->setNotNull();
$column31->setPrimaryKey();
$column32 = new Column('name', 'varchar', 40);
$column32->setNotNull();
$column41 = new Column('id', 'integer', 7);