public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) { try { parent::__construct($request, $response, $invokeArgs); $this->_mapInvokeArgs($invokeArgs); $this->_mapConfig($this->_config); require_once 'Sitengine/Status.php'; $this->_status = Sitengine_Status::getInstance(); $this->_locale = $this->getEnv()->getLocaleInstance(); $this->_translate = $this->_getTranslateInstance(); $this->_templateIndexView = $this->getEnv()->getIncludesDir() . '/Sitengine/Error/_Templates/IndexView.html'; } catch (Exception $exception) { require_once 'Sitengine/Error/Exception.php'; throw new Sitengine_Error_Exception('object instantiation error', $exception); } }
public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) { try { parent::__construct($request, $response, $invokeArgs); $this->_mapInvokeArgs($invokeArgs); $this->_mapConfig($this->_config); $this->_logger = $this->getEnv()->getLoggerInstance($this->getEnv()->getMyLogsDir(), gmdate('Ymd') . '-sitengine.log', $this->getEnv()->getLogFilterPriority(), get_class($this)); $this->_database = $this->getEnv()->getDatabaseInstance('Pdo_Mysql', $this->getEnv()->getDatabaseConfig('default'), $this->getEnv()->getDebugControl()); $this->getEnv()->startSession($this->getDatabase()); require_once 'Sitengine/Status.php'; $this->_status = Sitengine_Status::getInstance(); require_once 'Sitengine/Env/Preferences.php'; $this->_preferences = Sitengine_Env_Preferences::getInstance(); $this->_locale = $this->getEnv()->getLocaleInstance(); $this->_permiso = $this->getFrontController()->getPermiso()->start($this->getDatabase()); require_once 'Zend/Session/Namespace.php'; $this->_namespace = new Zend_Session_Namespace(get_class($this)); } catch (Exception $exception) { require_once 'Sitengine/Proto/Binaries/Couldies/Uploads/Exception.php'; throw new Sitengine_Proto_Binaries_Couldies_Uploads_Exception('object instantiation error', $exception); } }
public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) { try { parent::__construct($request, $response, $invokeArgs); $this->_mapInvokeArgs($invokeArgs); $this->_mapConfig($this->_config); #$this->_setSelfSubmitUri(); $this->_logger = $this->getEnv()->getLoggerInstance($this->getEnv()->getMyLogsDir(), gmdate('Ymd') . '-sitengine.log', $this->getEnv()->getLogFilterPriority(), get_class($this)); $this->_database = $this->getEnv()->getDatabaseInstance('Pdo_Mysql', $this->getEnv()->getDatabaseConfig('default'), $this->getEnv()->getDebugControl()); $this->getEnv()->startSession($this->getDatabase()); require_once 'Sitengine/Status.php'; $this->_status = Sitengine_Status::getInstance(); require_once 'Sitengine/Env/Preferences.php'; $this->_preferences = Sitengine_Env_Preferences::getInstance(); $this->_locale = $this->getEnv()->getLocaleInstance(); $this->_permiso = $this->getFrontController()->getPermiso()->start($this->getDatabase()); $this->_translate = $this->_getTranslateInstance(); require_once 'Zend/Session/Namespace.php'; $this->_namespace = new Zend_Session_Namespace(get_class($this)); $this->_templateSubscribeView = $this->getEnv()->getIncludesDir() . '/Sitengine/Newsletter/Frontend/Subscriptions/_Templates/SubscribeView.html'; $this->_templateUnsubscribeView = $this->getEnv()->getIncludesDir() . '/Sitengine/Newsletter/Frontend/Subscriptions/_Templates/UnsubscribeView.html'; $this->_templateConfirmOptinView = $this->getEnv()->getIncludesDir() . '/Sitengine/Newsletter/Frontend/Subscriptions/_Templates/ConfirmOptinView.html'; $this->_templateConfirmFinalView = $this->getEnv()->getIncludesDir() . '/Sitengine/Newsletter/Frontend/Subscriptions/_Templates/ConfirmFinalView.html'; $this->_templateConfirmUnsubscribeView = $this->getEnv()->getIncludesDir() . '/Sitengine/Newsletter/Frontend/Subscriptions/_Templates/ConfirmUnsubscribeView.html'; } catch (Exception $exception) { require_once 'Sitengine/Newsletter/Frontend/Subscriptions/Exception.php'; throw new Sitengine_Newsletter_Frontend_Subscriptions_Exception('object instantiation error', $exception); } }
public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) { try { parent::__construct($request, $response, $invokeArgs); $this->_mapInvokeArgs($invokeArgs); $this->_mapConfig($this->_config); #$this->_setSelfSubmitUri(); $this->_logger = $this->getEnv()->getLoggerInstance($this->getEnv()->getMyLogsDir(), gmdate('Ymd') . '-sitengine.log', $this->getEnv()->getLogFilterPriority(), get_class($this)); $this->_database = $this->getEnv()->getDatabaseInstance('Pdo_Mysql', $this->getEnv()->getDatabaseConfig('default'), $this->getEnv()->getDebugControl()); $options = array(); $routeName = $this->getFrontController()->getRouter()->getCurrentRouteName(); if ($routeName == Sitengine_Proto_Backend_Front::ROUTE_GOODIES_SHOULDIES_UPLOAD) { # allow session id to come from GET on uploads from flash application $options = array('use_only_cookies' => 0); } $this->getEnv()->startSession($this->getDatabase(), $options); $this->getFrontController()->getProtoPackage()->start($this->getDatabase()); require_once 'Sitengine/Status.php'; $this->_status = Sitengine_Status::getInstance(); require_once 'Sitengine/Env/Preferences.php'; $this->_preferences = Sitengine_Env_Preferences::getInstance(); $this->_locale = $this->getEnv()->getLocaleInstance(); $this->_permiso = $this->getFrontController()->getPermiso()->start($this->getDatabase()); $this->_translate = $this->_getTranslateInstance(); $this->_entity = $this->_getEntityModelInstance(); require_once 'Zend/Session/Namespace.php'; $this->_namespace = new Zend_Session_Namespace(get_class($this)); $this->_templateIndexView = $this->getEnv()->getIncludesDir() . '/Sitengine/Proto/Backend/Goodies/Shouldies/_Templates/IndexView.html'; $this->_templateFormView = $this->getEnv()->getIncludesDir() . '/Sitengine/Proto/Backend/Goodies/Shouldies/_Templates/FormView.html'; $this->_templateUploadView = $this->getEnv()->getIncludesDir() . '/Sitengine/Proto/Backend/Goodies/Shouldies/_Templates/UploadView.html'; $this->_templateAssignView = $this->getEnv()->getIncludesDir() . '/Sitengine/Proto/Backend/Goodies/Shouldies/_Templates/AssignView.html'; } catch (Exception $exception) { require_once 'Sitengine/Proto/Backend/Goodies/Shouldies/Exception.php'; throw new Sitengine_Proto_Backend_Goodies_Shouldies_Exception('object instantiation error', $exception); } }
public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) { try { parent::__construct($request, $response, $invokeArgs); $this->_mapInvokeArgs($invokeArgs); $this->_mapConfig($this->_config); #$this->_setSelfSubmitUri(); $this->_logger = $this->getEnv()->getLoggerInstance($this->getEnv()->getMyLogsDir(), gmdate('Ymd') . '-sitengine.log', $this->getEnv()->getLogFilterPriority(), get_class($this)); $this->_database = $this->getEnv()->getDatabaseInstance('Pdo_Mysql', $this->getEnv()->getDatabaseConfig('default'), $this->getEnv()->getDebugControl()); $this->getEnv()->startSession($this->getDatabase()); require_once 'Sitengine/Status.php'; $this->_status = Sitengine_Status::getInstance(); require_once 'Sitengine/Env/Preferences.php'; $this->_preferences = Sitengine_Env_Preferences::getInstance(); $this->_locale = $this->getEnv()->getLocaleInstance(); $this->_permiso = $this->getFrontController()->getPermiso()->start($this->getDatabase()); $this->_translate = $this->_getTranslateInstance(); $this->_transcripts = $this->_getTranscriptsInstance(); $this->_entity = $this->_getEntityModelInstance(); require_once 'Zend/Session/Namespace.php'; $this->_namespace = new Zend_Session_Namespace(get_class($this)); $this->_templateIndexView = $this->getEnv()->getIncludesDir() . '/Sitengine/Sitemap/Backend/_Templates/IndexView.html'; $this->_templateSearchView = $this->getEnv()->getIncludesDir() . '/Sitengine/Sitemap/Backend/_Templates/SearchView.html'; $this->_templateFileFormView = $this->getEnv()->getIncludesDir() . '/Sitengine/Sitemap/Backend/_Templates/FileFormView.html'; $this->_templatePageFormView = $this->getEnv()->getIncludesDir() . '/Sitengine/Sitemap/Backend/_Templates/PageFormView.html'; $this->_templateMaskFormView = $this->getEnv()->getIncludesDir() . '/Sitengine/Sitemap/Backend/_Templates/MaskFormView.html'; $this->_templateLayerFormView = $this->getEnv()->getIncludesDir() . '/Sitengine/Sitemap/Backend/_Templates/LayerFormView.html'; $this->_templateSnippetFormView = $this->getEnv()->getIncludesDir() . '/Sitengine/Sitemap/Backend/_Templates/SnippetFormView.html'; } catch (Exception $exception) { require_once 'Sitengine/Sitemap/Backend/Exception.php'; throw new Sitengine_Sitemap_Backend_Exception('object instantiation error', $exception); } }
protected function _save(Sitengine_Permiso_Model_Account_Form $form) { require_once 'Sitengine/Status.php'; $status = Sitengine_Status::getInstance(); if (!$form->isValid($_POST)) { foreach ($form->getMessages() as $key => $messages) { $status->addHint($key, $messages); } return false; } if ($this->_getUserRow() === null) { $this->_userRow = $this->getPermiso()->getUsersTable()->createRow($form->getValues()); $this->_getUserRow()->setId(Sitengine_String::createId()); $this->_getUserRow()->setCdate($this->getPermiso()->getUsersTable()->getNow()); $this->_getUserRow()->setPassword($this->_makePasswordHash($form->getPasswordVal())); } else { $password = $form->getPasswordVal() ? $this->_makePasswordHash($form->getPasswordVal()) : $this->_getUserRow()->getPassword(); $this->_getUserRow()->setFromArray($form->getValues()); $this->_getUserRow()->setPassword($password); } try { $this->_getUserRow()->setMdate($this->getPermiso()->getUsersTable()->getNow()); $this->_getUserRow()->setEnabled(1); # TODO - a better way for use in other contexts $this->_getUserRow()->save(); } catch (Exception $exception) { if ($this->getPermiso()->getUsersTable()->checkModifyException($exception)) { throw $exception; } switch ($this->getPermiso()->getUsersTable()->getError()) { case 'nameExists': $hint = self::HINT_NAME_EXISTS; break; case 'nicknameExists': $hint = self::HINT_NICKNAME_EXISTS; break; default: $hint = self::HINT_UNKNOWN_ERROR; break; } $message = $this->_getTranslator()->translate($hint); $status->addHint($hint, $message); return false; } return true; }
public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) { try { parent::__construct($request, $response, $invokeArgs); $this->_mapInvokeArgs($invokeArgs); $this->_mapConfig($this->_config); #$this->_setSelfSubmitUri(); $this->_logger = $this->getEnv()->getLoggerInstance($this->getEnv()->getMyLogsDir(), gmdate('Ymd') . '-sitengine.log', $this->getEnv()->getLogFilterPriority(), get_class($this)); $this->_database = $this->getEnv()->getDatabaseInstance('Pdo_Mysql', $this->getEnv()->getDatabaseConfig('default'), $this->getEnv()->getDebugControl()); $this->getEnv()->startSession($this->getDatabase()); $this->getFrontController()->getBlogPackage()->start($this->getDatabase()); require_once 'Sitengine/Status.php'; $this->_status = Sitengine_Status::getInstance(); require_once 'Sitengine/Env/Preferences.php'; $this->_preferences = Sitengine_Env_Preferences::getInstance(); $this->_locale = $this->getEnv()->getLocaleInstance(); $this->_permiso = $this->getFrontController()->getPermiso()->start($this->getDatabase()); $this->_translate = $this->_getTranslateInstance(); $this->_entity = $this->_getEntityModelInstance(); require_once 'Zend/Session/Namespace.php'; $this->_namespace = new Zend_Session_Namespace(get_class($this)); $this->_templateIndexView = $this->getEnv()->getIncludesDir() . '/Sitengine/Blog/Frontend/Blogs/Posts/_Templates/IndexView.html'; $this->_templateTextView = $this->getEnv()->getIncludesDir() . '/Sitengine/Blog/Frontend/Blogs/Posts/_Templates/TextView.html'; $this->_templatePhotoView = $this->getEnv()->getIncludesDir() . '/Sitengine/Blog/Frontend/Blogs/Posts/_Templates/PhotoView.html'; $this->_templateGalleryView = $this->getEnv()->getIncludesDir() . '/Sitengine/Blog/Frontend/Blogs/Posts/_Templates/GalleryView.html'; $this->_templateQuoteView = $this->getEnv()->getIncludesDir() . '/Sitengine/Blog/Frontend/Blogs/Posts/_Templates/QuoteView.html'; $this->_templateLinkView = $this->getEnv()->getIncludesDir() . '/Sitengine/Blog/Frontend/Blogs/Posts/_Templates/LinkView.html'; $this->_templateAudioView = $this->getEnv()->getIncludesDir() . '/Sitengine/Blog/Frontend/Blogs/Posts/_Templates/AudioView.html'; $this->_templateVideoView = $this->getEnv()->getIncludesDir() . '/Sitengine/Blog/Frontend/Blogs/Posts/_Templates/VideoView.html'; } catch (Exception $exception) { require_once 'Sitengine/Blog/Frontend/Blogs/Posts/Exception.php'; throw new Sitengine_Blog_Frontend_Blogs_Posts_Exception('object instantiation error', $exception); } }