本文整理汇总了PHP中Templates::fetchAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Templates::fetchAll方法的具体用法?PHP Templates::fetchAll怎么用?PHP Templates::fetchAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Templates
的用法示例。
在下文中一共展示了Templates::fetchAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listAction
function listAction()
{
$this->view->album_id = $this->_request->getParam('album_id', 0);
$this->view->title = 'Viewer List';
$this->view->all_templates_added = false;
$viewers = new Viewers();
$select = $viewers->select()->setIntegrityCheck(false);
$select->from('viewers')->join('templates', 'templates.id = viewers.template_id', array('name AS template_name', 'width AS template_width', 'height AS template_height', 'data AS template_data'))->where('viewers.album_id = ?', $this->view->album_id);
$this->view->viewers = $viewers->fetchAll($select);
$templates = new Templates();
$template_rows = $templates->fetchAll();
if (count($template_rows) == count($this->view->viewers)) {
$this->view->all_templates_added = true;
}
$response = $this->getResponse();
$this->logger->info("response: {$response}");
$this->getResponse()->prepend('blah', 'had');
}
示例2: listAction
function listAction()
{
$this->view->title = 'Template List';
$templates = new Templates();
$this->view->templates = $templates->fetchAll($templates->select()->order('name'));
}