Example #1
0
 public function __construct($uri = null)
 {
     if (null === $uri) {
         $uri = 'http://framework.zend.com/foo/bar/baz/2';
     }
     parent::__construct($uri);
 }
Example #2
0
 public function __construct($uri = null)
 {
     $this->_var = new Zenmondo_Controller_Request_Http_Var();
     // default ...?
     $this->setVarCheckEncoding(mb_internal_encoding());
     return parent::__construct($uri);
 }
Example #3
0
 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);
         }
     }
 }
Example #4
0
 public function __construct($uri = null)
 {
     parent::__construct($uri);
     $names = Mage::getConfig()->getNode(self::XML_NODE_DIRECT_FRONT_NAMES);
     if ($names) {
         $this->_directFrontNames = $names->asArray();
     }
 }
 /**
  * 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);
 }
Example #6
0
 public function __construct($uri = null)
 {
     parent::__construct($uri);
     $names = array();
     //direct front names
     if ($names) {
         $this->_directFrontNames = $names->asArray();
     }
 }
Example #7
0
 /**
  * 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);
 }
 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);
 }
 /**
  * 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);
 }
Example #10
0
 public function __construct($uri = null)
 {
     if (null === $uri) {
         $uri = 'http://localhost/foo/bar/baz/2';
     }
     parent::__construct($uri);
 }
Example #11
0
 /**
  * @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;
 }
Example #12
0
 /**
  * Set current API type.
  *
  * @param string $apiType
  * @param null|string|Zend_Uri $uri
  */
 public function __construct($apiType, $uri = null)
 {
     $this->setApiType($apiType);
     parent::__construct($uri);
 }
Example #13
0
 public function __construct($uri = null)
 {
     $this->_restMappings = $this->_getRestMappings();
     parent::__construct($uri);
 }