Zend Framework动作助手(Zend_Controller_Action_Helper)用法详解

要来得的用户名称。可是seesion的操作难免复杂,能够应用Flash
Messenger迅速的兑现那些需要。

帮手基类提供的常用方法如下:

<?php
/**
 * @see Zend_Controller_Action_HelperBroker_PriorityStack
 */
require_once 'Zend/Controller/Action/HelperBroker/PriorityStack.php';
/**
 * @see Zend_Loader
 */
require_once 'Zend/Loader.php';
/**
 * @category  Zend
 * @package  Zend_Controller
 * @subpackage Zend_Controller_Action
 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license  http://framework.zend.com/license/new-bsd   New BSD License
 */
class Zend_Controller_Action_HelperBroker
{
  /**
   * $_actionController - ActionController reference
   *
   * @var Zend_Controller_Action
   */
  protected $_actionController;
  /**
   * @var Zend_Loader_PluginLoader_Interface
   */
  protected static $_pluginLoader;
  /**
   * $_helpers - Helper array
   *
   * @var Zend_Controller_Action_HelperBroker_PriorityStack
   */
  protected static $_stack = null;
  /**
   * Set PluginLoader for use with broker
   *
   * @param Zend_Loader_PluginLoader_Interface $loader
   * @return void
   */
  public static function setPluginLoader($loader)
  {
    if ((null !== $loader) && (!$loader instanceof Zend_Loader_PluginLoader_Interface)) {
      require_once 'Zend/Controller/Action/Exception.php';
      throw new Zend_Controller_Action_Exception('Invalid plugin loader provided to HelperBroker');
    }
    self::$_pluginLoader = $loader;
  }
  /**
   * Retrieve PluginLoader
   *
   * @return Zend_Loader_PluginLoader
   */
  public static function getPluginLoader()
  {
    if (null === self::$_pluginLoader) {
      require_once 'Zend/Loader/PluginLoader.php';
      self::$_pluginLoader = new Zend_Loader_PluginLoader(array(
        'Zend_Controller_Action_Helper' => 'Zend/Controller/Action/Helper/',
      ));
    }
    return self::$_pluginLoader;
  }
  /**
   * addPrefix() - Add repository of helpers by prefix
   *
   * @param string $prefix
   */
  static public function addPrefix($prefix)
  {
    $prefix = rtrim($prefix, '_');
    $path  = str_replace('_', DIRECTORY_SEPARATOR, $prefix);
    self::getPluginLoader()->addPrefixPath($prefix, $path);
  }
  /**
   * addPath() - Add path to repositories where Action_Helpers could be found.
   *
   * @param string $path
   * @param string $prefix Optional; defaults to 'Zend_Controller_Action_Helper'
   * @return void
   */
  static public function addPath($path, $prefix = 'Zend_Controller_Action_Helper')
  {
    self::getPluginLoader()->addPrefixPath($prefix, $path);
  }
  /**
   * addHelper() - Add helper objects
   *
   * @param Zend_Controller_Action_Helper_Abstract $helper
   * @return void
   */
  static public function addHelper(Zend_Controller_Action_Helper_Abstract $helper)
  {
    self::getStack()->push($helper);
    return;
  }
  /**
   * resetHelpers()
   *
   * @return void
   */
  static public function resetHelpers()
  {
    self::$_stack = null;
    return;
  }
  /**
   * Retrieve or initialize a helper statically
   *
   * Retrieves a helper object statically, loading on-demand if the helper
   * does not already exist in the stack. Always returns a helper, unless
   * the helper class cannot be found.
   *
   * @param string $name
   * @return Zend_Controller_Action_Helper_Abstract
   */
  public static function getStaticHelper($name)
  {
    $name = self::_normalizeHelperName($name);
    $stack = self::getStack();
    if (!isset($stack->{$name})) {
      self::_loadHelper($name);
    }
    return $stack->{$name};
  }
  /**
   * getExistingHelper() - get helper by name
   *
   * Static method to retrieve helper object. Only retrieves helpers already
   * initialized with the broker (either via addHelper() or on-demand loading
   * via getHelper()).
   *
   * Throws an exception if the referenced helper does not exist in the
   * stack; use {@link hasHelper()} to check if the helper is registered
   * prior to retrieving it.
   *
   * @param string $name
   * @return Zend_Controller_Action_Helper_Abstract
   * @throws Zend_Controller_Action_Exception
   */
  public static function getExistingHelper($name)
  {
    $name = self::_normalizeHelperName($name);
    $stack = self::getStack();
    if (!isset($stack->{$name})) {
      require_once 'Zend/Controller/Action/Exception.php';
      throw new Zend_Controller_Action_Exception('Action helper "' . $name . '" has not been registered with the helper broker');
    }
    return $stack->{$name};
  }
  /**
   * Return all registered helpers as helper => object pairs
   *
   * @return array
   */
  public static function getExistingHelpers()
  {
    return self::getStack()->getHelpersByName();
  }
  /**
   * Is a particular helper loaded in the broker?
   *
   * @param string $name
   * @return boolean
   */
  public static function hasHelper($name)
  {
    $name = self::_normalizeHelperName($name);
    return isset(self::getStack()->{$name});
  }
  /**
   * Remove a particular helper from the broker
   *
   * @param string $name
   * @return boolean
   */
  public static function removeHelper($name)
  {
    $name = self::_normalizeHelperName($name);
    $stack = self::getStack();
    if (isset($stack->{$name})) {
      unset($stack->{$name});
    }
    return false;
  }
  /**
   * Lazy load the priority stack and return it
   *
   * @return Zend_Controller_Action_HelperBroker_PriorityStack
   */
  public static function getStack()
  {
    if (self::$_stack == null) {
      self::$_stack = new Zend_Controller_Action_HelperBroker_PriorityStack();
    }
    return self::$_stack;
  }
  /**
   * Constructor
   *
   * @param Zend_Controller_Action $actionController
   * @return void
   */
  public function __construct(Zend_Controller_Action $actionController)
  {
    $this->_actionController = $actionController;
    foreach (self::getStack() as $helper) {
      $helper->setActionController($actionController);
      $helper->init();
    }
  }
  /**
   * notifyPreDispatch() - called by action controller dispatch method
   *
   * @return void
   */
  public function notifyPreDispatch()
  {
    foreach (self::getStack() as $helper) {
      $helper->preDispatch();
    }
  }
  /**
   * notifyPostDispatch() - called by action controller dispatch method
   *
   * @return void
   */
  public function notifyPostDispatch()
  {
    foreach (self::getStack() as $helper) {
      $helper->postDispatch();
    }
  }
  /**
   * getHelper() - get helper by name
   *
   * @param string $name
   * @return Zend_Controller_Action_Helper_Abstract
   */
  public function getHelper($name)
  {
    $name = self::_normalizeHelperName($name);
    $stack = self::getStack();
    if (!isset($stack->{$name})) {
      self::_loadHelper($name);
    }
    $helper = $stack->{$name};
    $initialize = false;
    if (null === ($actionController = $helper->getActionController())) {
      $initialize = true;
    } elseif ($actionController !== $this->_actionController) {
      $initialize = true;
    }
    if ($initialize) {
      $helper->setActionController($this->_actionController)
          ->init();
    }
    return $helper;
  }
  /**
   * Method overloading
   *
   * @param string $method
   * @param array $args
   * @return mixed
   * @throws Zend_Controller_Action_Exception if helper does not have a direct() method
   */
  public function __call($method, $args)
  {
    $helper = $this->getHelper($method);
    if (!method_exists($helper, 'direct')) {
      require_once 'Zend/Controller/Action/Exception.php';
      throw new Zend_Controller_Action_Exception('Helper "' . $method . '" does not support overloading via direct()');
    }
    return call_user_func_array(array($helper, 'direct'), $args);
  }
  /**
   * Retrieve helper by name as object property
   *
   * @param string $name
   * @return Zend_Controller_Action_Helper_Abstract
   */
  public function __get($name)
  {
    return $this->getHelper($name);
  }
  /**
   * Normalize helper name for lookups
   *
   * @param string $name
   * @return string
   */
  protected static function _normalizeHelperName($name)
  {
    if (strpos($name, '_') !== false) {
      $name = str_replace(' ', '', ucwords(str_replace('_', ' ', $name)));
    }
    return ucfirst($name);
  }
  /**
   * Load a helper
   *
   * @param string $name
   * @return void
   */
  protected static function _loadHelper($name)
  {
    try {
      $class = self::getPluginLoader()->load($name);
    } catch (Zend_Loader_PluginLoader_Exception $e) {
      require_once 'Zend/Controller/Action/Exception.php';
      throw new Zend_Controller_Action_Exception('Action Helper by name ' . $name . ' not found', 0, $e);
    }
    $helper = new $class();
    if (!$helper instanceof Zend_Controller_Action_Helper_Abstract) {
      require_once 'Zend/Controller/Action/Exception.php';
      throw new Zend_Controller_Action_Exception('Helper name ' . $name . ' -> class ' . $class . ' is not of type Zend_Controller_Action_Helper_Abstract');
    }
    self::getStack()->push($helper);
  }
}

指望本文所述对大家PHP程序设计有所扶助。

FlashMessenger帮手允许你传递用户恐怕需求在下个哀告看到的音讯。

例如说,借使类名称叫Zend_Controller_Action_Helper_Redirector,他将回来
Redirector,假设类名字为FooMessage,将会回去全名。

动作帮手得以向其余Zend_Controller_Action的衍生动作调整器中,即时的参预功用(runtime
and/or on-demand
functionality),以使得扩展公共的动作调节器功用时,尽量减弱衍生动作调控器类的必备。

Url首要用于成立url;

新增/helper_demo1/application/views/scripts/user/regtips.phtml

修改文件:/helper_demo1/application/Bootstrap.php

二、判读帮手是否留存

更加多关于zend相关内容感兴趣的读者可查阅本站专项论题:《Zend
FrameWork框架入门教程》、《php特出开荒框架总括》、《Yii框架入门及常用能力计算》、《ThinkPHP入门教程》、《php面向对象程序设计入门教程》、《php+mysql数据库操作入门教程》及《php常见数据库操作能力汇总》

访问
跳转到

比如表达自定义动作帮手类

2.经过addPrefix()方法满含三个类前缀参数,用来投入自定义帮手类的不二等秘书诀。
务求前缀遵从Zend Framework的类命名惯例。

string(101)
“/helper_demo1/public/modulename/controllername/actionname/param1/%E4%B8%AD%E6%96%87%E5%8F%82%E6%95%B0”
string(101)
“/helper_demo1/public/modulename/controllername/actionname/params/%E4%B8%AD%E6%96%87%E5%8F%82%E6%95%B0”
string(101)
“/helper_demo1/public/modulename/controllername/actionname/param1/%E4%B8%AD%E6%96%87%E5%8F%82%E6%95%B0”

<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package  Zend_Controller
 * @subpackage Zend_Controller_Action_Helper
 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license  http://framework.zend.com/license/new-bsd   New BSD License
 */
/**
 * @see Zend_Session
 */
require_once 'Zend/Session.php';
/**
 * @see Zend_Controller_Action_Helper_Abstract
 */
require_once 'Zend/Controller/Action/Helper/Abstract.php';
/**
 * Flash Messenger - implement session-based messages
 *
 * @uses    Zend_Controller_Action_Helper_Abstract
 * @category  Zend
 * @package  Zend_Controller
 * @subpackage Zend_Controller_Action_Helper
 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license  http://framework.zend.com/license/new-bsd   New BSD License
 * @version  $Id: FlashMessenger.php 23775 2011-03-01 17:25:24Z ralph $
 */
class Zend_Controller_Action_Helper_FlashMessenger extends Zend_Controller_Action_Helper_Abstract implements IteratorAggregate, Countable
{
  /**
   * $_messages - Messages from previous request
   *
   * @var array
   */
  static protected $_messages = array();
  /**
   * $_session - Zend_Session storage object
   *
   * @var Zend_Session
   */
  static protected $_session = null;
  /**
   * $_messageAdded - Wether a message has been previously added
   *
   * @var boolean
   */
  static protected $_messageAdded = false;
  /**
   * $_namespace - Instance namespace, default is 'default'
   *
   * @var string
   */
  protected $_namespace = 'default';
  /**
   * __construct() - Instance constructor, needed to get iterators, etc
   *
   * @param string $namespace
   * @return void
   */
  public function __construct()
  {
    if (!self::$_session instanceof Zend_Session_Namespace) {
      self::$_session = new Zend_Session_Namespace($this->getName());
      foreach (self::$_session as $namespace => $messages) {
        self::$_messages[$namespace] = $messages;
        unset(self::$_session->{$namespace});
      }
    }
  }
  /**
   * postDispatch() - runs after action is dispatched, in this
   * case, it is resetting the namespace in case we have forwarded to a different
   * action, Flashmessage will be 'clean' (default namespace)
   *
   * @return Zend_Controller_Action_Helper_FlashMessenger Provides a fluent interface
   */
  public function postDispatch()
  {
    $this->resetNamespace();
    return $this;
  }
  /**
   * setNamespace() - change the namespace messages are added to, useful for
   * per action controller messaging between requests
   *
   * @param string $namespace
   * @return Zend_Controller_Action_Helper_FlashMessenger Provides a fluent interface
   */
  public function setNamespace($namespace = 'default')
  {
    $this->_namespace = $namespace;
    return $this;
  }
  /**
   * resetNamespace() - reset the namespace to the default
   *
   * @return Zend_Controller_Action_Helper_FlashMessenger Provides a fluent interface
   */
  public function resetNamespace()
  {
    $this->setNamespace();
    return $this;
  }
  /**
   * addMessage() - Add a message to flash message
   *
   * @param string $message
   * @return Zend_Controller_Action_Helper_FlashMessenger Provides a fluent interface
   */
  public function addMessage($message)
  {
    if (self::$_messageAdded === false) {
      self::$_session->setExpirationHops(1, null, true);
    }
    if (!is_array(self::$_session->{$this->_namespace})) {
      self::$_session->{$this->_namespace} = array();
    }
    self::$_session->{$this->_namespace}[] = $message;
    return $this;
  }
  /**
   * hasMessages() - Wether a specific namespace has messages
   *
   * @return boolean
   */
  public function hasMessages()
  {
    return isset(self::$_messages[$this->_namespace]);
  }
  /**
   * getMessages() - Get messages from a specific namespace
   *
   * @return array
   */
  public function getMessages()
  {
    if ($this->hasMessages()) {
      return self::$_messages[$this->_namespace];
    }
    return array();
  }
  /**
   * Clear all messages from the previous request & current namespace
   *
   * @return boolean True if messages were cleared, false if none existed
   */
  public function clearMessages()
  {
    if ($this->hasMessages()) {
      unset(self::$_messages[$this->_namespace]);
      return true;
    }
    return false;
  }
  /**
   * hasCurrentMessages() - check to see if messages have been added to current
   * namespace within this request
   *
   * @return boolean
   */
  public function hasCurrentMessages()
  {
    return isset(self::$_session->{$this->_namespace});
  }
  /**
   * getCurrentMessages() - get messages that have been added to the current
   * namespace within this request
   *
   * @return array
   */
  public function getCurrentMessages()
  {
    if ($this->hasCurrentMessages()) {
      return self::$_session->{$this->_namespace};
    }
    return array();
  }
  /**
   * clear messages from the current request & current namespace
   *
   * @return boolean
   */
  public function clearCurrentMessages()
  {
    if ($this->hasCurrentMessages()) {
      unset(self::$_session->{$this->_namespace});
      return true;
    }
    return false;
  }
  /**
   * getIterator() - complete the IteratorAggregate interface, for iterating
   *
   * @return ArrayObject
   */
  public function getIterator()
  {
    if ($this->hasMessages()) {
      return new ArrayObject($this->getMessages());
    }
    return new ArrayObject();
  }
  /**
   * count() - Complete the countable interface
   *
   * @return int
   */
  public function count()
  {
    if ($this->hasMessages()) {
      return count($this->getMessages());
    }
    return 0;
  }
  /**
   * Strategy pattern: proxy to addMessage()
   *
   * @param string $message
   * @return void
   */
  public function direct($message)
  {
    return $this->addMessage($message);
  }
}

急需注意的便是什么样是帮手类的前缀,帮手类的称号以及帮手的路径。

您或者感兴趣的小说:

  • Zend
    Framework教程之Zend_Helpers动作帮手ViewRenderer用法详解
  • Zend
    Framework教程之动作的基类Zend_Controller_Action详解
  • Zend
    Framework动作帮手Redirector用法实例详解
  • Zend
    Framework动作帮手Url用法详解
  • Zend
    Framework动作帮手Json用法实例深入分析
  • Zend
    Framework动作助手FlashMessenger用法详解
  • Zend
    Framework制造自个儿的动作助手详解
  • Zend
    Framework教程从前端调控器Zend_Controller_Front用法详解
  • php入门教程之Zend
    Studio设置与支出实例
  • Zend
    Framework开荒入门美貌教程
  • Zend
    Framework动作调控器用法示例
/**
 * @see Zend_Controller_Action_Helper_Abstract
 */
require_once 'Zend/Controller/Action/Helper/Abstract.php';
/**
 * Helper for creating URLs for redirects and other tasks
 *
 * @uses    Zend_Controller_Action_Helper_Abstract
 * @category  Zend
 * @package  Zend_Controller
 * @subpackage Zend_Controller_Action_Helper
 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license  http://framework.zend.com/license/new-bsd   New BSD License
 */
class Zend_Controller_Action_Helper_Url extends Zend_Controller_Action_Helper_Abstract
{
  /**
   * Create URL based on default route
   *
   * @param string $action
   * @param string $controller
   * @param string $module
   * @param array $params
   * @return string
   */
  public function simple($action, $controller = null, $module = null, array $params = null)
  {
    $request = $this->getRequest();
    if (null === $controller) {
      $controller = $request->getControllerName();
    }
    if (null === $module) {
      $module = $request->getModuleName();
    }
    $url = $controller . '/' . $action;
    if ($module != $this->getFrontController()->getDispatcher()->getDefaultModule()) {
      $url = $module . '/' . $url;
    }
    if ('' !== ($baseUrl = $this->getFrontController()->getBaseUrl())) {
      $url = $baseUrl . '/' . $url;
    }
    if (null !== $params) {
      $paramPairs = array();
      foreach ($params as $key => $value) {
        $paramPairs[] = urlencode($key) . '/' . urlencode($value);
      }
      $paramString = implode('/', $paramPairs);
      $url .= '/' . $paramString;
    }
    $url = '/' . ltrim($url, '/');
    return $url;
  }
  /**
   * Assembles a URL based on a given route
   *
   * This method will typically be used for more complex operations, as it
   * ties into the route objects registered with the router.
   *
   * @param array  $urlOptions Options passed to the assemble method of the Route object.
   * @param mixed  $name    The name of a Route to use. If null it will use the current Route
   * @param boolean $reset
   * @param boolean $encode
   * @return string Url for the link href attribute.
   */
  public function url($urlOptions = array(), $name = null, $reset = false, $encode = true)
  {
    $router = $this->getFrontController()->getRouter();
    return $router->assemble($urlOptions, $name, $reset, $encode);
  }
  /**
   * Perform helper when called as $this->_helper->url() from an action controller
   *
   * Proxies to {@link simple()}
   *
   * @param string $action
   * @param string $controller
   * @param string $module
   * @param array $params
   * @return string
   */
  public function direct($action, $controller = null, $module = null, array $params = null)
  {
    return $this->simple($action, $controller, $module, $params);
  }
}
<?php
class UserController extends Zend_Controller_Action
{
  protected $_flashMessenger = null;
  public function init()
  {
    $this->_flashMessenger =
    $this->_helper->getHelper('FlashMessenger');
    $this->initView();
  }
  public function registerAction()
  {
    $this->_flashMessenger->addMessage('xxxxx,Welcome!');
    $this->_helper->redirector('regtips');
  }
  public function regtipsAction()
  {
    $this->view->messages = $this->_flashMessenger->getMessages();
  }
}
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
  protected function _initAutoload()
  {
    $autoloader = Zend_Loader_Autoloader::getInstance();
    $autoloader->registerNamespace(array('Application_'));
  }
  protected function _initActionHelpers() {
    //用前缀形式
    //Zend_Controller_Action_HelperBroker::addPrefix('Application_Controller_Action_Helpers');
    //指定目录和前缀
    //Zend_Controller_Action_HelperBroker::addPath('/www/helper_demo1/library/Application/Controller/Action/Helpers',
    //                  'Application_Controller_Action_Helpers');
    //new一个助手类传入
    Zend_Controller_Action_HelperBroker::addHelper(new Application_Controller_Action_Helpers_UrlParser);
  }
}
$redirector = $this->_helper->getHelper('Redirector');
//$redirector->getName();
$redirector->gotoSimple('index2');

您恐怕感兴趣的稿子:

  • Zend
    Framework教程之Zend_Helpers动作助手ViewRenderer用法详解
  • Zend
    Framework教程之动作的基类Zend_Controller_Action详解
  • Zend
    Framework动作帮手Redirector用法实例详解
  • Zend
    Framework动作帮手Json用法实例深入分析
  • Zend
    Framework动作帮手FlashMessenger用法详解
  • Zend
    Framework创制协和的动作援手详解
  • Zend
    Framework动作帮手(Zend_Controller_Action_Helper)用法详解
  • Zend
    Framework教程从前端调节器Zend_Controller_Front用法详解
  • php入门教程之Zend
    Studio设置与花费实例
  • Zend
    Framework开荒入门突出教程
  • Zend
    Framework动作调整器用法示例

FlashMessager完结源码如下

<?php
class IndexController extends Zend_Controller_Action
{
  public function init()
  {
    /* Initialize action controller here */
  }
  public function indexAction()
  {
    $urlParser = $this->_helper->getHelper('UrlParser');
  var_dump($urlParser->parse('//www.jb51.net/article/80479.htm'));
  }
}

Zend_Controller_Action_HelperBroker

正文实例呈报了Zend
Framework动作援手Url用法。分享给大家供大家参考,具体如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>test</title>
</head>
<body>
<?php
var_dump($this->messages);
?>
</body>
</html>

帮厨的悬空基类是Zend_Controller_Action_Helper_Abstract,如要定义自个儿的帮手,须要持续此类。

经过助车格局,能够把一部分平时利用的功用模块做封装,进而在能够在急需的地方灵活运用,首即便在action使用。

public function simple($action, $controller = null, $module = null, array $params = null)
public function url($urlOptions = array(), $name = null, $reset = false, $encode = true)
public function direct($action, $controller = null, $module = null, array $params = null)



<?php
class IndexController extends Zend_Controller_Action
{
  public function init()
  {
    /* Initialize action controller here */
  }
  public function indexAction()
  {
    //$urlParser = $this->_helper->getHelper('UrlParser');
    //var_dump($urlParser->parse('//www.jb51.net/article/80479.htm'));
    $url = $this->_helper->getHelper('Url');
    $action = 'actionname';
    $controller = 'controllername';
    $module = 'modulename';
    $params = array('param1'=>'中文参数');
    var_dump($url->simple($action, $controller, $module, $params));
    $urlOptions = array(
        'action'=>$action,
        'controller'=>$controller,
        'module'=>$module,
        'params'=>$params);
    var_dump($url->url($urlOptions));
    var_dump($url->direct($action, $controller, $module, $params));
    exit;
  }
}

盼望本文所述对大家PHP程序设计有着协理。

你或者感兴趣的稿子:

  • Zend
    Framework教程之Zend_Helpers动作帮手ViewRenderer用法详解
  • Zend
    Framework教程之动作的基类Zend_Controller_Action详解
  • Zend
    Framework动作帮手Redirector用法实例详解
  • Zend
    Framework动作助手Url用法详解
  • Zend
    Framework动作助手Json用法实例解析
  • Zend
    Framework动作帮手FlashMessenger用法详解
  • Zend
    Framework动作帮手(Zend_Controller_Action_Helper)用法详解
  • Zend
    Framework教程此前端调节器Zend_Controller_Front用法详解
  • php入门教程之Zend
    Studio设置与开支实例
  • Zend
    Framework开采入门卓绝教程
  • Zend
    Framework动作调控器用法示例
$redirector = $this->_helper->Redirector;

www.localzend.com/helper_demo1/public/index

FlashMessenger 用来拍卖Flash
Messenger会话;FlashMessenger是贰个奇妙的助理。

愿意本文所述对我们PHP程序设计具备帮衬。

希望本文所述对我们PHP程序设计有所帮衬。

贯彻源码如下:

正文实例陈说了Zend
Framework动作帮手FlashMessenger用法。分享给我们供我们仿照效法,具体如下:

正文实例叙述了Zend
Framework创设和睦的动作帮手实现方式。分享给我们供我们参谋,具体如下:

动手经纪人用于注册帮手对象和帮助办公室路线以及获得帮手等等功效。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图