コード例 #1
0
 public static function getInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
         self::$_instance->_table = 'feadback';
     }
     return self::$_instance;
 }
コード例 #2
0
 public function feadbackAction()
 {
     $this->_resource = 'user';
     $this->isAllowed('view');
     $request = $this->getRequest();
     $form = new Application_Form_UserFeadback();
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($request->getPost())) {
             Application_Model_FeadbackRepository::getInstance()->send($form->getValue('message'));
             $mail = new Application_Service_Mail();
             $mail->report('New feadback from ' . $this->isLoggedin()->getName() . ':<br>' . $form->getValue('message'));
             echo '<div class="center"><br>' . $this->_translate->_('feadback_send_successful') . '</div>';
             return;
         }
     }
     $this->view->form = $form;
 }