2019-07-17 20:16:19 +00:00
|
|
|
<?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_Tool
|
|
|
|
* @subpackage Framework
|
|
|
|
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
|
|
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
2019-07-17 20:31:04 +00:00
|
|
|
* @version $Id: Request.php 18951 2009-11-12 16:26:19Z alexander $
|
2019-07-17 20:16:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @category Zend
|
|
|
|
* @package Zend_Tool
|
|
|
|
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
|
|
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
|
|
|
*/
|
|
|
|
class Zend_Tool_Framework_Client_Request
|
|
|
|
{
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $_providerName = null;
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $_specialtyName = null;
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $_actionName = null;
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $_actionParameters = array();
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $_providerParameters = array();
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
protected $_isPretend = false;
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
protected $_isDebug = false;
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
protected $_isVerbose = false;
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
protected $_isDispatchable = true;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* setProviderName()
|
|
|
|
*
|
|
|
|
* @param string $providerName
|
|
|
|
* @return Zend_Tool_Framework_Client_Request
|
|
|
|
*/
|
|
|
|
public function setProviderName($providerName)
|
|
|
|
{
|
|
|
|
$this->_providerName = $providerName;
|
|
|
|
return $this;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* getProviderName()
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getProviderName()
|
|
|
|
{
|
|
|
|
return $this->_providerName;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* setSpecialtyName()
|
|
|
|
*
|
|
|
|
* @param string $specialtyName
|
|
|
|
* @return Zend_Tool_Framework_Client_Request
|
|
|
|
*/
|
|
|
|
public function setSpecialtyName($specialtyName)
|
|
|
|
{
|
|
|
|
$this->_specialtyName = $specialtyName;
|
|
|
|
return $this;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* getSpecialtyName()
|
2019-07-17 20:31:04 +00:00
|
|
|
*
|
2019-07-17 20:16:19 +00:00
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getSpecialtyName()
|
|
|
|
{
|
|
|
|
return $this->_specialtyName;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* setActionName()
|
|
|
|
*
|
|
|
|
* @param string $actionName
|
|
|
|
* @return Zend_Tool_Framework_Client_Request
|
|
|
|
*/
|
|
|
|
public function setActionName($actionName)
|
|
|
|
{
|
2019-07-17 20:31:04 +00:00
|
|
|
$this->_actionName = $actionName;
|
2019-07-17 20:16:19 +00:00
|
|
|
return $this;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* getActionName()
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getActionName()
|
|
|
|
{
|
|
|
|
return $this->_actionName;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* setActionParameter()
|
|
|
|
*
|
|
|
|
* @param string $parameterName
|
|
|
|
* @param string $parameterValue
|
|
|
|
* @return Zend_Tool_Framework_Client_Request
|
|
|
|
*/
|
|
|
|
public function setActionParameter($parameterName, $parameterValue)
|
|
|
|
{
|
|
|
|
$this->_actionParameters[$parameterName] = $parameterValue;
|
|
|
|
return $this;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* getActionParameters()
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getActionParameters()
|
|
|
|
{
|
|
|
|
return $this->_actionParameters;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* getActionParameter()
|
|
|
|
*
|
|
|
|
* @param string $parameterName
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getActionParameter($parameterName)
|
|
|
|
{
|
|
|
|
return (isset($this->_actionParameters[$parameterName])) ? $this->_actionParameters[$parameterName] : null;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* setProviderParameter()
|
|
|
|
*
|
|
|
|
* @param string $parameterName
|
|
|
|
* @param string $parameterValue
|
|
|
|
* @return Zend_Tool_Framework_Client_Request
|
|
|
|
*/
|
|
|
|
public function setProviderParameter($parameterName, $parameterValue)
|
|
|
|
{
|
|
|
|
$this->_providerParameters[$parameterName] = $parameterValue;
|
|
|
|
return $this;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* getProviderParameters()
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getProviderParameters()
|
|
|
|
{
|
|
|
|
return $this->_providerParameters;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* getProviderParameter()
|
|
|
|
*
|
|
|
|
* @param string $parameterName
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getProviderParameter($parameterName)
|
|
|
|
{
|
|
|
|
return (isset($this->_providerParameters[$parameterName])) ? $this->_providerParameters[$parameterName] : null;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* setPretend()
|
|
|
|
*
|
|
|
|
* @param bool $pretend
|
|
|
|
* @return Zend_Tool_Framework_Client_Request
|
|
|
|
*/
|
|
|
|
public function setPretend($pretend)
|
|
|
|
{
|
|
|
|
$this->_isPretend = (bool) $pretend;
|
|
|
|
return $this;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* isPretend() - Whether or not this is a pretend request
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isPretend()
|
|
|
|
{
|
|
|
|
return $this->_isPretend;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* setDebug()
|
|
|
|
*
|
|
|
|
* @param bool $pretend
|
|
|
|
* @return Zend_Tool_Framework_Client_Request
|
|
|
|
*/
|
|
|
|
public function setDebug($debug)
|
|
|
|
{
|
|
|
|
$this->_isDebug = (bool) $debug;
|
|
|
|
return $this;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* isDebug() - Whether or not this is a debug enabled request
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isDebug()
|
|
|
|
{
|
|
|
|
return $this->_isDebug;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* setVerbose()
|
|
|
|
*
|
|
|
|
* @param bool $verbose
|
|
|
|
* @return Zend_Tool_Framework_Client_Request
|
|
|
|
*/
|
|
|
|
public function setVerbose($verbose)
|
|
|
|
{
|
|
|
|
$this->_isVerbose = (bool) $verbose;
|
|
|
|
return $this;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* isVerbose() - Whether or not this is a verbose enabled request
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isVerbose()
|
|
|
|
{
|
|
|
|
return $this->_isVerbose;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* setDispatchable()
|
|
|
|
*
|
|
|
|
* @param bool $dispatchable
|
|
|
|
* @return Zend_Tool_Framework_Client_Request
|
|
|
|
*/
|
|
|
|
public function setDispatchable($dispatchable)
|
|
|
|
{
|
|
|
|
$this->_isDispatchable = (bool) $dispatchable;
|
|
|
|
return $this;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
/**
|
|
|
|
* isDispatchable() Is this request Dispatchable?
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isDispatchable()
|
|
|
|
{
|
|
|
|
return $this->_isDispatchable;
|
|
|
|
}
|
2019-07-17 20:31:04 +00:00
|
|
|
|
2019-07-17 20:16:19 +00:00
|
|
|
}
|