我一直在尝试获取一个字段的 ASC/DESC 调用命令(假设是 craeted),但我似乎无法弄清楚如何在 ZF2 中执行此操作。
我哪里错了..?
namespace Todo\Model;
class TodoTable extends AbstractTableGateway {
public function __construct(Adapter $adapter) {
$this->adapter = $adapter;
$this->resultSetPrototype = new ResultSet();
$this->resultSetPrototype->setArrayObjectPrototype(new Todo());
$this->initialize();
}
public function fetchAll() {
$resultSet = $this->select(array('user_id'=>$this->user_id));
return $resultSet;
}
}