本文整理汇总了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';
}
示例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);
}
示例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]);
}
示例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);
}
示例5: __construct
public function __construct($config = array())
{
if (array_key_exists('basePath', $config) === false) {
$basePath = APPLICATION_PATH . '/views/';
$config['basePath'] = $basePath;
}
parent::__construct($config);
}
示例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);
}
示例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();
}
}
示例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/');
}
示例9: __construct
public function __construct($options)
{
parent::__construct( $options );
}
示例10: __construct
/**
* Constructor.
*
* @param array $config Configuration key-value pairs.
* @return void
*/
public function __construct($config = array())
{
parent::__construct($config);
}
示例11: __construct
public function __construct()
{
$this->root_sprocket = new Sprocket();
parent::__construct();
}
示例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);
}
}