本文整理汇总了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());
}