public function setError($error) { if (Zmz_Utils::isDebug()) { if ($error instanceof Exception) { $errorString = $error->getMessage(); } } else { if ($error instanceof Zmz_Error_Exception) { $errorString = $error->getMessage(); } } if (empty($errorString)) { if (is_string($error)) { $errorString = $error; } else { $errorString = 'Application error'; } } // $errorString = (string) $error; // // // if ($error instanceof Zmz_Json_Response_Exception) { // $errorString = $error->getMessage(); // } // // // if ($error instanceof Exception) { // $errorString = $error->getMessage(); // } else { // $errorString = (string) $error; // } $this->_error = $errorString; }
public function addJavascript($js) { $script = (string) $js; $script = Zmz_Utils::clearScript($script); $view = Zend_Layout::getMvcInstance()->getView(); $view->headScript()->appendScript($script); }
public function __construct(Zend_Form $form) { parent::__construct(); $this->view = Zend_Layout::getMvcInstance()->getView(); $this->formName = $form->getName(); $elementsBelongTo = $form->getElementsBelongTo(); $this->elementPrefix = ''; if ($elementsBelongTo) { $this->elementPrefix = Zmz_Utils::stripFormArrayNotation($elementsBelongTo); $this->elementPrefix .= '-'; } $this->init(); }
public function direct($default = null) { return Zmz_Utils::getReferer($default); }
public function addJquery($js) { $script = (string) $js; $script = Zmz_Utils::clearScript($script); $this->jquery->addOnLoad($script); }