当前位置: 首页>>代码示例>>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;未经允许,请勿转载。