本文整理汇总了PHP中Kwf_Model_Select::fromArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Kwf_Model_Select::fromArray方法的具体用法?PHP Kwf_Model_Select::fromArray怎么用?PHP Kwf_Model_Select::fromArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kwf_Model_Select
的用法示例。
在下文中一共展示了Kwf_Model_Select::fromArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testToArrayFromArray
public function testToArrayFromArray()
{
$select = new Kwf_Model_Select();
$select->where(new Kwf_Model_Select_Expr_Or(array(new Kwf_Model_Select_Expr_Equals('foo', 'bar'), new Kwf_Model_Select_Expr_Not(new Kwf_Model_Select_Expr_Equals('baz', 'buz')))));
$select->whereEquals('blub', 123);
$ar = $select->toArray();
$this->assertEquals(is_array($ar), true);
$select2 = Kwf_Model_Select::fromArray($ar);
$this->assertEquals($select, $select2);
}
示例2: fromArray
public static function fromArray(array $data)
{
$cls = 'Kwf_Model_Select_Expr_' . $data['exprType'];
$select = $data['select'] ? Kwf_Model_Select::fromArray($data['select']) : null;
return new $cls($data['child'], Kwf_Model_Select_Expr::fromArray($data['expr']), $select);
}
示例3: callMultiple
public function callMultiple(array $call)
{
$ret = array();
foreach ($call as $method => &$arguments) {
foreach ($arguments as $k => $arg) {
if (is_array($arg) && !empty($arg['selectObjVersion'])) {
$call[$method][$k] = Kwf_Model_Select::fromArray($arg);
}
}
if ($method == 'export') {
if (!isset($arguments[1])) {
$arguments[1] = array();
}
if (!isset($arguments[2])) {
$arguments[2] = array();
}
$arguments[2]['columns'] = $this->_columns;
}
}
return $this->getModel()->callMultiple($call);
}