本文整理匯總了PHP中Propel\Generator\Model\Column::makeList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Column::makeList方法的具體用法?PHP Column::makeList怎麽用?PHP Column::makeList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Propel\Generator\Model\Column
的用法示例。
在下文中一共展示了Column::makeList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testMakeList
/**
* Tests static Column::makeList() method.
* @deprecated - Column::makeList() is deprecated and set to be removed in 1.3
*/
public function testMakeList()
{
$expected = 'Column0, Column1, Column2, Column3, Column4';
$objArray = array();
for ($i = 0; $i < 5; $i++) {
$c = new Column();
$c->setName("Column" . $i);
$objArray[] = $c;
}
$list = Column::makeList($objArray, new DefaultPlatform());
$this->assertEquals($expected, $list, sprintf("Expected '%s' match, got '%s' ", var_export($expected, true), var_export($list, true)));
$strArray = array();
for ($i = 0; $i < 5; $i++) {
$strArray[] = "Column" . $i;
}
$list = Column::makeList($strArray, new DefaultPlatform());
$this->assertEquals($expected, $list, sprintf("Expected '%s' match, got '%s' ", var_export($expected, true), var_export($list, true)));
}
示例2: getColumnList
/**
* Return a comma delimited string of the columns which compose this index.
* @deprecated because Column::makeList() is deprecated; use the array-returning getColumns() instead.
*/
public function getColumnList()
{
return Column::makeList($this->getColumns(), $this->getTable()->getDatabase()->getPlatform());
}