當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_View::addScriptPath方法代碼示例

本文整理匯總了PHP中Zend_View::addScriptPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_View::addScriptPath方法的具體用法?PHP Zend_View::addScriptPath怎麽用?PHP Zend_View::addScriptPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_View的用法示例。


在下文中一共展示了Zend_View::addScriptPath方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  *
  * @param string $charset
  */
 public function __construct($charset = 'UTF-8')
 {
     parent::__construct($charset);
     $this->view = Axis::app()->getBootstrap()->getResource('layout')->getView();
     $this->view->addScriptPath(Axis::config('system/path') . '/app/design/mail');
     $this->view->site = Axis::getSite()->name;
     $this->view->company = Axis::single('core/site')->getCompanyInfo();
 }
開發者ID:rguedes,項目名稱:axiscommerce,代碼行數:12,代碼來源:Mail.php

示例2: getView

 /**
  * Get view
  * 
  * @return Zend_View 
  */
 protected function getView()
 {
     if (!isset(self::$renderView)) {
         //init view
         self::$renderView = new Zend_View();
         self::$renderView->setScriptPath(APPLICATION_PATH . "/modules/teaser/views/scripts/templates/");
         self::$renderView->addHelperPath(APPLICATION_PATH . "/modules/teaser/views/helpers/", "Teaser_View_Helper");
         $mvcView = Zend_Layout::getMvcInstance()->getView();
         if (isset($mvcView->theme)) {
             self::$renderView->addScriptPath(APPLICATION_PATH . '/../themes/' . $mvcView->theme . '/views/teaser/templates/');
         }
     }
     return self::$renderView;
 }
開發者ID:bokultis,項目名稱:kardiomedika,代碼行數:19,代碼來源:RenderTeaser2.php

示例3: send

 /**
  * load the template and send the message
  *
  * @param string $recipient
  * @param array $from
  * @param string $subject
  * @param string $template
  * @param array $data
  * @param string $cc
  * @return bool
  */
 public function send($recipient, $from = array(), $subject, $message, $cc = false)
 {
     $config = Zend_Registry::get('config');
     $this->_view->addScriptPath($config->filepath->emailTemplates);
     $this->_view->emailBody = $message;
     $this->_mail->setBodyHtml($this->_view->render('template.phtml'));
     $this->_mail->setFrom($from[0], $from[1]);
     $this->_mail->addTo($recipient);
     if ($cc) {
         $this->_mail->addCc($cc);
     }
     $this->_mail->setSubject($subject);
     return $this->_mail->send($this->_transport);
 }
開發者ID:laiello,項目名稱:digitalus-cms,代碼行數:25,代碼來源:Mail.php

示例4: _initView

 protected function _initView()
 {
     $path = APPLICATION_PATH . '/modules/' . MODULE_NAME . '/views';
     $view = new Zend_View();
     $view->setUseStreamWrapper(true);
     $view->setEncoding('UTF-8');
     $view->addScriptPath($path . '/partials');
     $view->addScriptPath($path . '/scripts');
     $view->addHelperPath(APPLICATION_PATH . '/../library/Bbx/View/Helper', 'Bbx_View_Helper');
     $view->addHelperPath($path . '/helpers', 'ViewHelper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     Zend_Registry::set('view', $view);
 }
開發者ID:rdallasgray,項目名稱:bbx,代碼行數:14,代碼來源:ContextDependencies.php

示例5: Show

 public function Show($parameters)
 {
     $output = "";
     $ns = new Zend_Session_Namespace();
     $languageID = Languages::get_language_id($ns->lang);
     $mainviewhelper = new Zend_View();
     $mainviewhelper->addBasePath(APPLICATION_PATH . '/modules/default/views/');
     $view = new Zend_View();
     $view->addScriptPath('../library/Shineisp/Custom/views');
     $translator = Shineisp_Registry::getInstance()->Zend_Translate;
     if (!empty($parameters['code'])) {
         $code = $parameters['code'];
     } else {
         return "";
     }
     // Get the products
     $data = Products::GetProductsByGroupCode($code, $languageID);
     // Check the existence of the mandatories attributes
     if (!empty($data['attributes'][0])) {
         $view->attributes = $data['attributes'];
     }
     // Check if there are values set for the group of the product selected
     if (!empty($data['attributes_values'][0])) {
         $view->values = $data['attributes_values'];
     }
     // Get the products
     if (!empty($data['products'][0])) {
         $view->products = $data['products'];
     }
     $view->mainviewhelper = $mainviewhelper;
     // Path of the template
     return $view->render('productsattributes.phtml');
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:33,代碼來源:Productlistattributes.php

示例6: getView

 public function getView()
 {
     $view = new Zend_View();
     $view->addHelperPath(dirname(__FILE__) . '/../../../../library/Zend/View/Helper');
     $view->addScriptPath(dirname(__FILE__) . '/../_files/views/');
     return $view;
 }
開發者ID:ThorstenSuckow,項目名稱:conjoon,代碼行數:7,代碼來源:ViewScriptTest.php

示例7: renderBlock

 /**
  * Method constructure
  * @param string $name
  * @param Zend_View $view 
  */
 public function renderBlock($name, $view, $params = array())
 {
     $controllerName = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
     $actionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
     $view->addScriptPath(APPLICATION_PATH . '/views/scripts/' . $controllerName . '/block');
     $this->_setViewByParams($view, $params);
     //set view
     return $view->render($name . '.phtml');
     //render view
 }
開發者ID:hocondoimeo,項目名稱:giasu-tam.com,代碼行數:15,代碼來源:RenderBlock.php

示例8: Show

 public function Show($parameters)
 {
     $view = new Zend_View();
     $view->addScriptPath('../library/Shineisp/Custom/views');
     $ns = new Zend_Session_Namespace();
     $languageID = Languages::get_language_id($ns->lang);
     // Generate the xml file in the public path /documents
     Reviews::getXMLDataMap($languageID);
     return $view->render('reviewsmap.phtml');
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:10,代碼來源:ReviewsMap.php

示例9: _prepareView

 /**
  * Prepare view to be used
  *
  * @return void
  */
 private function _prepareView()
 {
     $defaultScriptPath = $this->getApplicationPath() . '/views/scripts/';
     if (!in_array($defaultScriptPath, $this->view->getScriptPaths())) {
         $this->view->addScriptPath($defaultScriptPath);
     }
     $defaultHelperPath = $this->getApplicationPath() . '/views/helpers/';
     if (!in_array($defaultHelperPath, $this->view->getHelperPaths())) {
         $this->view->addHelperPath($defaultHelperPath);
     }
 }
開發者ID:JellyBellyDev,項目名稱:zle,代碼行數:16,代碼來源:Mvc.php

示例10: Show

 /**
  * Show the domain checker form
  */
 public function Show($parameters)
 {
     $view = new Zend_View();
     $form = new Default_Form_DomainsinglecheckerForm(array('action' => '/domainschk/check', 'method' => 'post'));
     $translator = Shineisp_Registry::getInstance()->Zend_Translate;
     $title = !empty($parameters['title']) ? $parameters['title'] : "Choose your new domain name!";
     $form->getElement('name')->setAttrib('title', $translator->translate($title));
     // Set the path of the view templates
     $view->addScriptPath('../library/Shineisp/Custom/views');
     $view->form = $form;
     return $view->render('domainchecker.phtml');
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:15,代碼來源:DomainChecker.php

示例11: init

 public function init()
 {
     $view = new Zend_View($this->getOptions());
     $view->addScriptPath(APPLICATION_PATH . '/scripts');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')->appendHttpEquiv('X-UA-Compatible', 'IE=EmulateIE7')->appendName('viewport', 'width=device-width; initial-scale=1.0;')->appendName('viewport', 'user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0');
     $view->headLink(array('rel' => 'shortcut bookmark icon', 'type' => 'image/x-icon', 'href' => '/branding/images/shared/pathbuilder.ico', 'PREPEND'))->appendStylesheet('/resources/css/reset.css')->appendStylesheet('/resources/css/base.css')->appendStylesheet('/branding/css/global.css');
     $view->headScript()->appendFile('/lib/core/jquery.min.js')->appendFile('/lib/core/base.js')->appendFile('/lib/core/templates.js')->appendFile('/lib/i10n/en.js');
     require_once 'default/forms/SearchHeader.php';
     $view->searchform = new Default_Form_SearchHeader();
     return $view;
 }
開發者ID:revoleers,項目名稱:rewardimizer-server,代碼行數:13,代碼來源:View.php

示例12: resetView

 /**
  * Reset the view's script paths and set new ones
  * @todo: Move elsewhere - it shouldn't be in a service
  *
  * @param string $module
  * @param string $type
  */
 private function resetView($module, $type)
 {
     $module = ucfirst($module);
     $layout = Zend_Layout::getMvcInstance();
     // Reset view script paths
     $this->view->setScriptPath(null);
     // Build new ones for blocks
     $this->view->addBasePath(ZfApplication::$_base_path . "/app/" . ucfirst($module) . "/views", ucfirst($module) . "_View");
     $this->view->addScriptPath(ZfApplication::$_base_path . "/app/Content/views/scripts/{$type}");
     $this->view->addScriptPath(ZfApplication::$_base_path . "/app/" . ucfirst($module) . "/views/scripts/{$type}");
     $this->view->addScriptPath($layout->getLayoutPath() . "default/templates/" . ucfirst($module) . "/{$type}");
     $this->view->addScriptPath($layout->getLayoutPath() . $layout->getLayout() . "/templates/" . ucfirst($module) . "/{$type}");
 }
開發者ID:BGCX261,項目名稱:zoocms-svn-to-git,代碼行數:20,代碼來源:Content.php

示例13: send

 public function send()
 {
     $config = Zend_Registry::get('config');
     $mail = new Zend_Mail('utf-8');
     $mail->setSubject('Bericht via de website van ' . $config->company->name)->setFrom($this->getEmail(), $this->getName() . ' ' . $this->getFirstName());
     $view = new Zend_View();
     $view->assign('contact', $this);
     $view->assign('config', $config);
     $view->addScriptPath(APPLICATION_PATH . '/modules/default/views/scripts');
     $body = $view->render('/contact/_mailMessage.phtml');
     $mail->setBodyHtml($body);
     $mail->addTo($config->contact->to);
     return $mail->send();
 }
開發者ID:sonvq,項目名稱:2015_freelance6,代碼行數:14,代碼來源:Contact.php

示例14: Show

 public function Show($parameters)
 {
     $view = new Zend_View();
     $view->addScriptPath('../library/Shineisp/Custom/views');
     $limit = 5;
     $ns = new Zend_Session_Namespace();
     $languageID = Languages::get_language_id($ns->lang);
     $translator = Shineisp_Registry::getInstance()->Zend_Translate;
     if (!empty($parameters['limit']) && is_numeric($parameters['limit'])) {
         $limit = $parameters['limit'];
     }
     $view->data = Reviews::get_random($limit);
     return $view->render('reviewslist.phtml');
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:14,代碼來源:Reviewslist.php

示例15: _initDoctype

 protected function _initDoctype()
 {
     ///$this->bootstrap('view');
     // $view = $this->getResource('view');
     //  $view->doctype('XHTML1_STRICT');
     //enable class autoloader start
     require_once 'Zend/Loader/Autoloader.php';
     $loader = Zend_Loader_Autoloader::getInstance();
     $loader->setFallbackAutoloader(true);
     //enable class autoloader end
     $frontCtrl = Zend_Controller_Front::getInstance();
     $frontCtrl->throwExceptions(true);
     $frontCtrl->addModuleDirectory(APPLICATION_PATH . '/modules');
     //set include path for modules
     set_include_path(get_include_path() . PATH_SEPARATOR . APPLICATION_PATH . '/modules/');
     $config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/config.xml', 'production');
     //set database adaptor
     $db = Zend_Db::factory('PDO_MYSQL', $config->resources->db->params);
     Zend_Registry::set('db', $db);
     //cache setting start
     if ($config->configuration->cache) {
         $frontend = array('lifetime' => 200, 'cache_id_prefix' => 'site_', 'automatic_seralization' => true);
         $backend = array('cache_dir' => APPLICATION_PATH . '/../cache');
         $cache = Zend_Cache::factory('Page', 'File', $frontend, $backend);
         Zend_Registry::set('cache', $cache);
         $cache->start(md5($_SERVER['REQUEST_URI']));
     }
     $theme = 'default';
     if (isset($config->configuration->theme)) {
         $theme = $config->configuration->theme;
     }
     //theme layout path
     $layoutPath = APPLICATION_PATH . '/../public/themes/' . $theme . '/templates';
     //get module name
     $arrUrl = array_filter(explode("/", str_replace($config->configuration->base_path, '', $_SERVER['REQUEST_URI'])));
     $moduleName = current($arrUrl);
     $modules = array_keys($frontCtrl->getControllerDirectory());
     $moduleName = in_array($moduleName, $modules) ? $moduleName : 'default';
     $layout = Zend_Layout::startMvc()->setLayout('layout')->setLayoutPath($layoutPath)->setContentKey('content');
     //set view render
     $view = new Zend_View();
     $view->addBasePath($layoutPath . "/" . $moduleName);
     $view->addScriptPath($layoutPath . "/" . $moduleName);
     $view->doctype('XHTML1_STRICT');
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
 }
開發者ID:rashmigandhe,項目名稱:HHMobile,代碼行數:48,代碼來源:Bootstrap.php


注:本文中的Zend_View::addScriptPath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。