本文整理汇总了PHP中Zend\Db\ResultSet\ResultSet::order方法的典型用法代码示例。如果您正苦于以下问题:PHP ResultSet::order方法的具体用法?PHP ResultSet::order怎么用?PHP ResultSet::order使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\Db\ResultSet\ResultSet
的用法示例。
在下文中一共展示了ResultSet::order方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getServiceConfig
public function getServiceConfig()
{
return array('abstract_factories' => array(), 'aliases' => array(), 'factories' => array('AdMainTable' => function ($sm) {
$tableGateway = $sm->get('AdTableGateway');
$table = new AdMainTable($tableGateway);
return $table;
}, 'AdTableGateway' => function ($sm) {
$dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');
$resultSetPrototype = new ResultSet();
$resultSetPrototype->setArrayObjectPrototype(new Ad());
return new TableGateway('ads', $dbAdapter, null, $resultSetPrototype);
}, 'ImageTable' => function ($sm) {
$tableGateway = $sm->get('ImageTableGateway');
$table = new ImageTable($tableGateway);
return $table;
}, 'ImageTableGateway' => function ($sm) {
$dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');
$resultSetPrototype = new ResultSet();
$resultSetPrototype->setArrayObjectPrototype(new Image());
return new TableGateway('moto_images', $dbAdapter, null, $resultSetPrototype);
}, 'BrandMainTable' => function ($sm) {
$tableGateway = $sm->get('BrandTableGateway');
$table = new BrandMainTable($tableGateway);
return $table;
}, 'BrandTableGateway' => function ($sm) {
$dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');
$resultSetPrototype = new ResultSet();
$resultSetPrototype->order('brand_name ASC');
$resultSetPrototype->setArrayObjectPrototype(new Brand());
return new TableGateway('brands', $dbAdapter, null, $resultSetPrototype);
}, 'ModelMainTable' => function ($sm) {
$tableGateway = $sm->get('ModelTableGateway');
$table = new ModelMainTable($tableGateway);
return $table;
}, 'ModelTableGateway' => function ($sm) {
$dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');
$resultSetPrototype = new ResultSet();
$resultSetPrototype->setArrayObjectPrototype(new Model());
return new TableGateway('models', $dbAdapter, null, $resultSetPrototype);
}), 'invokables' => array(), 'services' => array(), 'shared' => array());
}