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


PHP Zend_View::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->setScriptPath(realpath(APPLICATION_PATH . '/../public') . '/skins/commons/invoices/');
     $this->assign('translator', Shineisp_Registry::getInstance()->Zend_Translate);
     require_once PROJECT_PATH . '/library/html2pdf/html2pdf.class.php';
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:7,代碼來源:Invoice.php

示例2: __construct

 /**
  * Constructor.
  *
  * @param array $options Configuration options.
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->setEngine(new PHPTAL());
     // configure the encoding
     if (isset($options['encoding']) && $options['encoding'] != '') {
         $this->setEncoding((string) $options['encoding']);
     } else {
         $this->setEncoding('UTF-8');
     }
     // change the compiled code destination if set in the config
     if (isset($options['cacheDirectory']) && $options['cacheDirectory'] != '') {
         $this->setCacheDirectory((string) $options['cacheDirectory']);
     }
     // configure the caching mode
     if (isset($options['cachePurgeMode'])) {
         $this->setCachePurgeMode($options['cachePurgeMode'] == '1');
     }
     // configure the whitespace compression mode
     if (isset($options['compressWhitespace'])) {
         $this->setCompressWhitespace($options['compressWhitespace'] == '1');
     }
     // configure the title separator
     if (isset($options['titleSeparator'])) {
         $this->headTitle()->setSeparator($options['titleSeparator']);
     }
     // configure the title
     if (isset($options['title'])) {
         $this->headTitle($options['title']);
     }
     // set the layout template path
     $this->addTemplateRepositoryPath(Zend_Layout::getMvcInstance()->getLayoutPath());
     // Set the remaining template repository directories;
     if (isset($options['globalTemplatesDirectory'])) {
         $directories = $options['globalTemplatesDirectory'];
         if (!is_array($directories)) {
             $directories = array($directories);
         }
         foreach ($directories as $currentDirectory) {
             $this->addTemplateRepositoryPath($currentDirectory);
         }
     }
     $ztalBasePath = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..');
     // Add ZTal's macro repository as a final default.
     $ztalMacroPath = $ztalBasePath . DIRECTORY_SEPARATOR . 'Macros';
     $this->addTemplateRepositoryPath($ztalMacroPath);
     //load in all php files that exist in the custom modifiers directory
     if (isset($options['customModifiersDirectory'])) {
         $customModifiers = $options['customModifiersDirectory'];
         if (!is_array($customModifiers)) {
             $customModifiers = array($customModifiers);
         }
         foreach ($customModifiers as $currentPath) {
             $this->addCustomModifiersPath($currentPath);
         }
     }
     // Add ZTal's tales repository as a final default.
     $ztalTalesPath = $ztalBasePath . DIRECTORY_SEPARATOR . 'Tales';
     $this->addCustomModifiersPath($ztalTalesPath);
 }
開發者ID:jo-m,項目名稱:ecamp3,代碼行數:65,代碼來源:View.php

示例3: __construct

 public function __construct($config = array())
 {
     parent::__construct($config = array());
     // add the path to the scripts
     $this->setScriptPath(APPLICATION_PATH . "/views/scripts/email/");
     $this->appname = getAppName();
     $config = Zend_Registry::get("config");
     // default sign off name and email
     $mail = Zend_Registry::get('mail');
     $default_sender = $mail->getDefaultFrom();
     //$this->signoffname = $default_sender['name'];
     //$this->signoffemail = $default_sender['email'];
     $this->signoffname = getDefaultAdminName();
     $this->signoffemail = getDefaultAdminEmail();
     $this->contactusurl = $this->serverUrl($this->baseUrl('contactus'));
     $this->logourl = $this->serverUrl($this->baseUrl('images/logo.jpg'));
     $this->loginurl = $this->serverUrl($this->baseUrl('user/login'));
     $this->baseurl = $this->serverUrl($this->baseUrl());
     $this->settingsurl = $this->serverUrl($this->baseUrl('profile/view/tab/account'));
     $allcolors = getAllThemeColors();
     //debugMessage($allcolors);
     $colortxt = getThemeColor();
     $themecolor = "blue";
     if (!isEmptyString($colortxt)) {
         $themecolor = $colortxt;
     }
     $this->themecolor = $allcolors[$themecolor];
     // debugMessage('color is '.$allcolors[$themecolor]);
 }
開發者ID:7thZoneTechnology,項目名稱:hrms-1,代碼行數:29,代碼來源:EmailTemplate.php

示例4: __construct

 public function __construct($config = array())
 {
     // Set the default script views if not supplied by user
     if (!array_key_exists('scriptPath', $config)) {
         $config['scriptPath'] = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'View');
     }
     parent::__construct($config);
 }
開發者ID:BGCX262,項目名稱:zym-svn-to-git,代碼行數:8,代碼來源:View.php

示例5: __construct

 public function __construct($config = array())
 {
     if (array_key_exists('basePath', $config) === false) {
         $basePath = APPLICATION_PATH . '/views/';
         $config['basePath'] = $basePath;
     }
     parent::__construct($config);
 }
開發者ID:eugenzor,項目名稱:zfhrtool,代碼行數:8,代碼來源:Email.php

示例6: __construct

 /**
  * Constructor.
  *
  * @param array $options Configuration options.
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->_preFiltersRegistered = false;
     if (isset($options['engineClass']) && $options['engineClass'] != '' && class_exists($options['engineClass']) && is_subclass_of($options['engineClass'], 'PHPTAL')) {
         $talClass = $options['engineClass'];
     } else {
         $talClass = '\\PHPTAL';
     }
     $this->setEngine(new $talClass());
     // configure the encoding
     if (isset($options['encoding']) && $options['encoding'] != '') {
         $this->setEncoding((string) $options['encoding']);
     } else {
         $this->setEncoding('UTF-8');
     }
     // change the compiled code destination if set in the config
     if (isset($options['cacheDirectory']) && $options['cacheDirectory'] != '') {
         $this->setCacheDirectory((string) $options['cacheDirectory']);
     }
     // configure the caching mode
     if (isset($options['cachePurgeMode'])) {
         $this->setCachePurgeMode($options['cachePurgeMode'] == '1');
     }
     // configure the whitespace compression mode
     if (isset($options['compressWhitespace'])) {
         $this->setCompressWhitespace($options['compressWhitespace'] == '1');
     }
     // Stack up the script paths. Zend's setScriptPath call is lifo
     // so we start with the bottom item first.
     // First set the path for Ztal's own macros
     $ztalBasePath = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..');
     $this->setScriptPath($ztalBasePath . DIRECTORY_SEPARATOR . 'Macros');
     // Now setup the directories specified in the Ztal config
     if (isset($options['globalTemplatesDirectory'])) {
         $directories = $options['globalTemplatesDirectory'];
         if (!is_array($directories)) {
             $directories = array($directories);
         }
         foreach ($directories as $currentDirectory) {
             $this->addScriptPath($currentDirectory);
         }
     }
     // Next setup the custom modifiers
     //load in all php files that exist in the custom modifiers directory
     if (isset($options['customModifiersDirectory'])) {
         $customModifiers = $options['customModifiersDirectory'];
         if (!is_array($customModifiers)) {
             $customModifiers = array($customModifiers);
         }
         foreach ($customModifiers as $currentPath) {
             $this->addCustomModifiersPath($currentPath);
         }
     }
     // Add ZTal's tales repository as a final default.
     $ztalTalesPath = $ztalBasePath . DIRECTORY_SEPARATOR . 'Tales';
     $this->addCustomModifiersPath($ztalTalesPath);
 }
開發者ID:namesco,項目名稱:ztal,代碼行數:63,代碼來源:View.php

示例7: __construct

 /**
  * Constructor
  */
 public function __construct($config = array(), $translate = null)
 {
     parent::__construct($config);
     $this->_translate = $translate;
     $this->_placeholderRegistry = Zend_View_Helper_Placeholder_Registry::getRegistry();
     if (array_key_exists('use_module_cache', $config) && (bool) $config['use_module_cache']) {
         $this->_moduleCache = OntoWiki::getInstance()->getCache();
     }
 }
開發者ID:dmj,項目名稱:uni-helmstedt.hab.de,代碼行數:12,代碼來源:View.php

示例8:

 function __construct($recipient, $recipientName, $subject, $template)
 {
     parent::__construct();
     $this->template = $template;
     $this->recipient = $recipient;
     $this->recipientName = $recipientName;
     $this->subject = $subject;
     $config = Zend_Registry::get('config');
     $this->url = $config['url'];
     $this->addScriptPath(APPLICATION_PATH . '/views/mails/');
 }
開發者ID:pwalczyszyn,項目名稱:detager-server,代碼行數:11,代碼來源:Mail.php

示例9: __construct

	public function __construct($options)
    {
		parent::__construct( $options );
    }
開發者ID:neotok,項目名稱:front,代碼行數:4,代碼來源:View.php

示例10: __construct

 /**
  * Constructor.
  *
  * @param array $config Configuration key-value pairs.
  * @return void
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
 }
開發者ID:BGCX261,項目名稱:zlayer-svn-to-git,代碼行數:10,代碼來源:View.php

示例11: __construct

 public function __construct()
 {
     $this->root_sprocket = new Sprocket();
     parent::__construct();
 }
開發者ID:laiello,項目名稱:phpsprockets,代碼行數:5,代碼來源:SprocketView.php

示例12:

 /**
  * Constructs new object using template name and auto render params
  *
  * @param string $template
  * @param int $auto 
  */
 function __construct($template = '', $auto = FALSE)
 {
     parent::__construct();
     $this->addHelperPath('Uni/Core/View/Helper', 'Uni_View_Helper');
     $this->viewBase = APPLICATION_PATH . DS . 'views' . DS . Fox::getMode() . DS;
     $this->defaultScriptPath = $this->viewBase . 'core' . DS . 'default' . DS . 'template';
     $this->auto = $auto;
     if ($template != '') {
         $this->setTemplate($template);
     }
 }
開發者ID:UnicodeSystems-PrivateLimited,項目名稱:Zendfox,代碼行數:17,代碼來源:View.php


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