本文整理匯總了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'));
}