当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_View::serverUrl方法代码示例

本文整理汇总了PHP中Zend_View::serverUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_View::serverUrl方法的具体用法?PHP Zend_View::serverUrl怎么用?PHP Zend_View::serverUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_View的用法示例。


在下文中一共展示了Zend_View::serverUrl方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: forgetPassword

 public function forgetPassword($controller, $model, $module = "default")
 {
     $view = new Zend_View();
     $items = $model->getItemsByCriteria(array("email=?" => $model->email));
     //print_r($exhibitors);exit;
     if (count($items["rows"]) > 0) {
         list($item) = $items["rows"];
     }
     if (isset($item)) {
         //$mail_model=Default_Model_Mail();
         $timestamp = time();
         $security_code = md5($item->id . $timestamp . $item->created);
         $retrieve_pw_uri = $view->serverUrl() . $view->url(array("module" => $module, "controller" => $controller, "action" => "resetpw", "id" => $item->id, "t" => $timestamp, "c" => $security_code), null, true);
         return $retrieve_pw_uri;
     } else {
         return null;
     }
 }
开发者ID:superchangme,项目名称:jsplugin,代码行数:18,代码来源:Account.php

示例2: getConfig

 /**
  * Get config
  *
  * @throws Zend_Controller_Action_Exception
  * @return array
  */
 public function getConfig()
 {
     if (!Zend_Registry::isRegistered('googleConfig')) {
         throw new Zend_Controller_Action_Exception('Google oAuth: config not found');
     }
     $config = Zend_Registry::get('googleConfig');
     if (empty($config['consumerKey'])) {
         throw new Zend_Controller_Action_Exception('Google oAuth: consumer key is missed');
     }
     if (empty($config['consumerSecret'])) {
         throw new Zend_Controller_Action_Exception('Google oAuth: consumer secret is missed');
     }
     if (strpos($config['callbackUrl'], 'http') !== 0) {
         $view = new Zend_View();
         $config['callbackUrl'] = $view->serverUrl($config['callbackUrl']);
     }
     return $config;
 }
开发者ID:uglide,项目名称:zfcore-transition,代码行数:24,代码来源:Google.php

示例3: getClient

 /**
  * Get twitter client
  *
  * @throws Zend_Controller_Action_Exception
  * @return Zend_Oauth_Consumer
  */
 public function getClient()
 {
     if (!$this->_client) {
         if (!Zend_Registry::isRegistered('twitterConfig')) {
             throw new Zend_Controller_Action_Exception('Twitter oAuth: config not found');
         }
         $config = Zend_Registry::get('twitterConfig');
         if (empty($config['consumerKey'])) {
             throw new Zend_Controller_Action_Exception('Twitter oAuth: consumer key is missed');
         }
         if (empty($config['consumerSecret'])) {
             throw new Zend_Controller_Action_Exception('Twitter oAuth: consumer secret is missed');
         }
         if (strpos($config['callbackUrl'], 'http') !== 0) {
             $view = new Zend_View();
             $config['callbackUrl'] = $view->serverUrl($config['callbackUrl']);
         }
         $this->setClient(new Zend_Oauth_Consumer($config));
     }
     return $this->_client;
 }
开发者ID:uglide,项目名称:zfcore-transition,代码行数:27,代码来源:Twitter.php

示例4: afterSave

 function afterSave()
 {
     $session = SessionWrapper::getInstance();
     # add log to audit trail
     $view = new Zend_View();
     $url = $view->serverUrl($view->baseUrl('role/view/id/' . encode($this->getID())));
     $usecase = '0.4';
     $module = '0';
     $type = SYSTEM_CREATEROLE;
     $details = "Role <a href='" . $url . "' class='blockanchor'>" . $this->getName() . "</a> created";
     $browser = new Browser();
     $audit_values = $session->getVar('browseraudit');
     $audit_values['module'] = $module;
     $audit_values['usecase'] = $usecase;
     $audit_values['transactiontype'] = $type;
     $audit_values['status'] = "Y";
     $audit_values['userid'] = $session->getVar('userid');
     $audit_values['transactiondetails'] = $details;
     $audit_values['url'] = $url;
     // debugMessage($audit_values);
     $this->notify(new sfEvent($this, $type, $audit_values));
 }
开发者ID:7thZoneTechnology,项目名称:hrms-1,代码行数:22,代码来源:AclGroup.php

示例5: getProfilePath

 function getProfilePath()
 {
     $path = "";
     $view = new Zend_View();
     // $path = '<a href="'.$view->serverUrl($view->baseUrl('user/'.strtolower($this->getUserName()))).'">'.$view->serverUrl($view->baseUrl('user/'.strtolower($this->getUserName()))).'</a>';
     $path = '<a href="javascript: void(0)">' . $view->serverUrl($view->baseUrl('user/' . strtolower($this->getUserName()))) . '</a>';
     return $path;
 }
开发者ID:7thZoneTechnology,项目名称:hrms-1,代码行数:8,代码来源:UserAccount.php

示例6: compile

 /**
  * Compile a less file
  *
  * @param \Zend_View $view
  * @param string $href The less file
  * @param boolean $always Always compile
  * @return boolean True when changed
  */
 public function compile(\Zend_View $view, $href, $always = false)
 {
     if (\MUtil_String::startsWith($href, 'http', true)) {
         // When a local url, strip the serverUrl and basepath
         $base = $view->serverUrl() . $view->baseUrl();
         if (\MUtil_String::startsWith($href, $base, true)) {
             // Only strip when urls match
             $href = substr($href, strlen($base));
         }
     }
     // Add full path to the webdir
     $inFile = $this->_webroot . '/' . $href;
     $outFile = substr($inFile, 0, -strlen(pathinfo($inFile, PATHINFO_EXTENSION))) . 'css';
     // Try compiling
     try {
         // \MUtil_Echo::track($inFile, $outFile);
         $lessc = new lessc();
         $lessc->registerFunction('base64encode', array($this, 'base64encode'));
         if ($always || array_key_exists('compilecss', \Zend_Controller_Front::getInstance()->getRequest()->getParams())) {
             $result = (bool) $lessc->compileFile($inFile, $outFile);
         } else {
             $result = $lessc->checkedCompile($inFile, $outFile);
         }
     } catch (\Exception $exc) {
         // If we have an error, present it if not in production
         if (APPLICATION_ENV !== 'production' || APPLICATION_ENV !== 'acceptance') {
             \MUtil_Echo::pre($exc->getMessage());
         }
         $result = null;
     }
     return $result;
 }
开发者ID:GemsTracker,项目名称:MUtil,代码行数:40,代码来源:HeadLink.php

示例7: enviarEmailSenha

 /**
  * Envia um email com os dados para Recuperacao/alteração da senha do usuário
  * @param Administrativo_Model_Usuario $oUsuario instancia do usuario
  */
 public static function enviarEmailSenha(Administrativo_Model_Usuario $oUsuario)
 {
     $sHash = $oUsuario->criarHash();
     $oView = new Zend_View();
     $oView->setScriptPath(APPLICATION_PATH . '/modules/auth/views/scripts/login/');
     $oView->sUrlRecuperarSenha = $oView->serverUrl("/auth/login/recuperar-senha/hash/{$sHash}");
     $oView->nome = $oUsuario->getEntity()->getNome();
     $sTextoEmail = $oView->render('email-recuperacao-senha.phtml');
     $oTranslate = Zend_Registry::get('Zend_Translate');
     DBSeller_Helper_Mail_Mail::send($oUsuario->getEmail(), $oTranslate->_('ECidadeOnline2 - Recuperação de Senha'), $sTextoEmail);
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:15,代码来源:Usuario.php


注:本文中的Zend_View::serverUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。