當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Column::setDescription方法代碼示例

本文整理匯總了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));
 }
開發者ID:SwissalpS,項目名稱:Propel2,代碼行數:8,代碼來源:MysqlPlatformMyISAMTest.php

示例2: testSetDescription

 public function testSetDescription()
 {
     $column = new Column();
     $column->setDescription('Some description');
     $this->assertSame('Some description', $column->getDescription());
 }
開發者ID:dracony,項目名稱:forked-php-orm-benchmark,代碼行數:6,代碼來源:ColumnTest.php

示例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);
開發者ID:disider,項目名稱:Propel2,代碼行數:31,代碼來源:blog-database.php

示例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);
開發者ID:kalaspuffar,項目名稱:php-orm-benchmark,代碼行數:31,代碼來源:blog-database.php


注:本文中的Propel\Generator\Model\Column::setDescription方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。