class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
class My_Controller_Plugin_Webinit extends Zend_Controller_Plugin_Abstract { public function preDispatch() { $controllerName = $ this ->_request->getControllerName(); $actionName = $ this ->_request->getActionName(); $view = Zend_Layout::getMvcInstance()->getView(); if ( file_exists(APPLICATION_CSS_FOLDER. '/' . $controllerName. '/' . $actionName. '.css' ) ) { $view->assign( 'cssControllerAction' ,$controllerName. '/' .$actionName. '.css' ); } if ( file_exists(APPLICATION_JS_FOLDER. '/' . $controllerName. '/' . $actionName. '.js' ) ) { $view->assign( 'jsControllerAction' , $controllerName. '/' .$actionName. '.js' ); } } } * This source code was highlighted with Source Code Highlighter .
* This source code was highlighted with Source Code Highlighter .
- protected function _initFrontControllerPlugins ()
- {
- $ frontController = Zend_Controller_Front :: getInstance ();
- $ frontController-> registerPlugin ( new My_Controller_Plugin_Webinit ());
- }
* This source code was highlighted with Source Code Highlighter .
- defined ( 'APPLICATION_PUBLIC_FOLDER' )
- || define ( 'APPLICATION_PUBLIC_FOLDER' ,
- dirname (__ FILE__));
- defined ( 'APPLICATION_CSS_FOLDER' )
- || define ( 'APPLICATION_CSS_FOLDER' ,
- realpath (APPLICATION_PUBLIC_FOLDER. '/ css' ));
- defined ( 'APPLICATION_JS_FOLDER' )
- || define ( 'APPLICATION_JS_FOLDER' ,
- realpath (APPLICATION_PUBLIC_FOLDER. '/ js' ));
* This source code was highlighted with Source Code Highlighter .
- <? if ($ this -> cssControllerAction) $ this -> headLink () -> appendStylesheet ( '/ css /' . $ this -> cssControllerAction)?>
- <? if ($ this -> jsControllerAction) $ this -> headScript () -> appendFile ( '/ js /' . $ this -> jsControllerAction)?>
* This source code was highlighted with Source Code Highlighter .
- $ ( document ) .ready ( function () {
- $ .TRANSLATION = {};
- });
* This source code was highlighted with Source Code Highlighter .
- <script type = "text / javascript" >
- $ ( document ) .ready ( function () {
- $ .data ($. TRANSLATION, "Nice to see you!" , '<? = $ this-> translate ("Nice to see you!")?>' );
- </ script>
* This source code was highlighted with Source Code Highlighter .
- alert ($ .data ($. TRANSLATION, "Nice to see you!" ));
Source: https://habr.com/ru/post/71619/
All Articles