本文整理汇总了PHP中Zend_Controller_Request_Http::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Controller_Request_Http::__construct方法的具体用法?PHP Zend_Controller_Request_Http::__construct怎么用?PHP Zend_Controller_Request_Http::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Controller_Request_Http
的用法示例。
在下文中一共展示了Zend_Controller_Request_Http::__construct方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($uri = null)
{
if (null === $uri) {
$uri = 'http://framework.zend.com/foo/bar/baz/2';
}
parent::__construct($uri);
}
示例2: __construct
public function __construct($uri = null)
{
$this->_var = new Zenmondo_Controller_Request_Http_Var();
// default ...?
$this->setVarCheckEncoding(mb_internal_encoding());
return parent::__construct($uri);
}
示例3: clone
function __construct(array $vars = null, $method = null, $uri = null)
{
if (is_string($uri)) {
$saved = $_SERVER['REQUEST_URI'];
$_SERVER['REQUEST_URI'] = $uri;
parent::__construct(null);
$_SERVER['REQUEST_URI'] = $saved;
} else {
parent::__construct();
}
if ($method !== null) {
$this->_method = $method;
}
$this->setParamSources(array($this->getMethod() == self::METHOD_POST ? '_POST' : '_GET'));
if ($vars !== null) {
if ($vars instanceof Am_Request) {
throw new Am_Exception_InternalError("Could not initialize Am_Request with Am_Request, use clone()");
}
$this->_vars = (array) $vars;
$this->setParamSources(array(self::USE_VARS));
} elseif (get_magic_quotes_gpc()) {
// array $vars must be already escaped if we get it above
if ($this->getMethod() == self::METHOD_POST) {
$_POST = self::ss($_POST);
} else {
$_GET = self::ss($_GET);
}
}
}
示例4: __construct
public function __construct($uri = null)
{
parent::__construct($uri);
$names = Mage::getConfig()->getNode(self::XML_NODE_DIRECT_FRONT_NAMES);
if ($names) {
$this->_directFrontNames = $names->asArray();
}
}
示例5: __construct
/**
* Constructor
*
* If a $uri is passed, the object will attempt to populate itself using
* that information.
*
* @param string|Zend_Uri $uri
* @return void
* @throws Zend_Controller_Request_Exception when invalid URI passed
*/
public function __construct($uri = null)
{
//重新设置key
$this->setControllerKey(self::ZEND_CTL_KEY);
$this->setActionKey(self::ZEND_ACT_KEY);
$this->setModuleKey(self::ZEND_MOD_KEY);
parent::__construct($uri);
}
示例6: __construct
public function __construct($uri = null)
{
parent::__construct($uri);
$names = array();
//direct front names
if ($names) {
$this->_directFrontNames = $names->asArray();
}
}
示例7: __construct
/**
* Modify pathInfo: strip down the front name and query parameters.
*
* @param \Magento\Framework\App\AreaList $areaList
* @param \Magento\Framework\Config\ScopeInterface $configScope
* @param null|string|\Zend_Uri $uri
*/
public function __construct(\Magento\Framework\App\AreaList $areaList, \Magento\Framework\Config\ScopeInterface $configScope, $uri = null)
{
parent::__construct($uri);
$areaFrontName = $areaList->getFrontName($configScope->getCurrentScope());
$this->_pathInfo = $this->_requestUri;
/** Remove base url and area from path */
$this->_pathInfo = preg_replace("#.*?/{$areaFrontName}/?#", '/', $this->_pathInfo);
/** Remove GET parameters from path */
$this->_pathInfo = preg_replace('#\\?.*#', '', $this->_pathInfo);
}
示例8: __construct
public function __construct($uri = null)
{
if (null === $uri) {
$uri = 'http://localhost/foo/bar/baz/2';
}
$uri = Zend_Uri_Http::fromString($uri);
$this->_host = $uri->getHost();
$this->_port = $uri->getPort();
parent::__construct($uri);
}
示例9: __construct
/**
* Constructor
*
* If a $uri is passed, the object will attempt to populate itself using
* that information.
* Override parent class to allow object instance get via Mage::getSingleton()
*
* @param string|Zend_Uri $uri
*/
public function __construct($uri = null)
{
parent::__construct($uri ? $uri : null);
}
示例10: __construct
/**
* @param \Magento\Framework\App\Route\ConfigInterface $routeConfig
* @param PathInfoProcessorInterface $pathInfoProcessor
* @param \Magento\Framework\Stdlib\CookieManager $cookieManager
* @param string $uri
* @param array $directFrontNames
*/
public function __construct(\Magento\Framework\App\Route\ConfigInterface $routeConfig, PathInfoProcessorInterface $pathInfoProcessor, \Magento\Framework\Stdlib\CookieManager $cookieManager, $uri = null, $directFrontNames = array())
{
$this->_routeConfig = $routeConfig;
$this->_directFrontNames = $directFrontNames;
parent::__construct($uri);
$this->_pathInfoProcessor = $pathInfoProcessor;
$this->_cookieManager = $cookieManager;
}
示例11: __construct
public function __construct($uri = null)
{
$this->_restMappings = $this->_getRestMappings();
parent::__construct($uri);
}