public function indexAction() { $handler = new Default_Model_AclHandler_Entry(); $handler = new Default_Model_AclHandler_User(); $this->view->users = $handler->getList(); $handler = new Default_Model_AclHandler_Community(); $this->view->communities = $handler->getList(); $handler = new Default_Model_AclHandler_Discussion(); $this->view->discussions = $handler->getList(array( 'entourage' => array( 'RecentEntry' => array( 'entourageModel' => 'Entry', 'entourageIdKey' => 'discussion_id', 'resourceIdKey' => 'id', 'singleOnly' => true, 'properties' => 'id discussion_id modified creator_user_id', 'entourage' => 'Creator', ) ) )); /* $this->view->discussion = $handler->getList(array( 'entourage' => 'EntriesWithCreator', 'where' => array('id' => $discussionId), )); $this->view->discussion = $this->view->discussion ? $this->view->discussion[0] : null; */ }
<?php // Initialize the application and bootstrap the database adapter defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application')); defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'development'); require_once 'Zend/Application.php'; $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); $bootstrap = $application->getBootstrap(); $bootstrap->bootstrap('application'); $bootstrap->bootstrap('db'); $bootstrap->bootstrap('autoload'); $discussion = new Default_Model_AclHandler_Discussion(); $list = $discussion->getList(array('where' => array('< id' => $startId))); var_dump($list); //$options = $bootstrap->getOptions(); //$indexDbAdapter = Zend_Db::factory($options['indexDb']['adapter'], $options['indexDb']['params']); return true;