File indexing completed on 2025-01-26 05:29:59

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Tool
0017  * @subpackage Framework
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id$
0021  */
0022 
0023 /**
0024  * @category   Zend
0025  * @package    Zend_Tool
0026  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0027  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0028  */
0029 class Zend_Tool_Framework_Client_Request
0030 {
0031 
0032     /**
0033      * @var string
0034      */
0035     protected $_providerName = null;
0036 
0037     /**
0038      * @var string
0039      */
0040     protected $_specialtyName = null;
0041 
0042     /**
0043      * @var string
0044      */
0045     protected $_actionName = null;
0046 
0047     /**
0048      * @var array
0049      */
0050     protected $_actionParameters = array();
0051 
0052     /**
0053      * @var array
0054      */
0055     protected $_providerParameters = array();
0056 
0057     /**
0058      * @var bool
0059      */
0060     protected $_isPretend = false;
0061 
0062     /**
0063      * @var bool
0064      */
0065     protected $_isDebug = false;
0066 
0067     /**
0068      * @var bool
0069      */
0070     protected $_isVerbose = false;
0071 
0072     /**
0073      * @var bool
0074      */
0075     protected $_isDispatchable = true;
0076 
0077     /**
0078      * setProviderName()
0079      *
0080      * @param string $providerName
0081      * @return Zend_Tool_Framework_Client_Request
0082      */
0083     public function setProviderName($providerName)
0084     {
0085         $this->_providerName = $providerName;
0086         return $this;
0087     }
0088 
0089     /**
0090      * getProviderName()
0091      *
0092      * @return string
0093      */
0094     public function getProviderName()
0095     {
0096         return $this->_providerName;
0097     }
0098 
0099     /**
0100      * setSpecialtyName()
0101      *
0102      * @param string $specialtyName
0103      * @return Zend_Tool_Framework_Client_Request
0104      */
0105     public function setSpecialtyName($specialtyName)
0106     {
0107         $this->_specialtyName = $specialtyName;
0108         return $this;
0109     }
0110 
0111     /**
0112      * getSpecialtyName()
0113      *
0114      * @return string
0115      */
0116     public function getSpecialtyName()
0117     {
0118         return $this->_specialtyName;
0119     }
0120 
0121     /**
0122      * setActionName()
0123      *
0124      * @param string $actionName
0125      * @return Zend_Tool_Framework_Client_Request
0126      */
0127     public function setActionName($actionName)
0128     {
0129         $this->_actionName = $actionName;
0130         return $this;
0131     }
0132 
0133     /**
0134      * getActionName()
0135      *
0136      * @return string
0137      */
0138     public function getActionName()
0139     {
0140         return $this->_actionName;
0141     }
0142 
0143     /**
0144      * setActionParameter()
0145      *
0146      * @param string $parameterName
0147      * @param string $parameterValue
0148      * @return Zend_Tool_Framework_Client_Request
0149      */
0150     public function setActionParameter($parameterName, $parameterValue)
0151     {
0152         $this->_actionParameters[$parameterName] = $parameterValue;
0153         return $this;
0154     }
0155 
0156     /**
0157      * getActionParameters()
0158      *
0159      * @return array
0160      */
0161     public function getActionParameters()
0162     {
0163         return $this->_actionParameters;
0164     }
0165 
0166     /**
0167      * getActionParameter()
0168      *
0169      * @param string $parameterName
0170      * @return string
0171      */
0172     public function getActionParameter($parameterName)
0173     {
0174         return (isset($this->_actionParameters[$parameterName])) ? $this->_actionParameters[$parameterName] : null;
0175     }
0176 
0177     /**
0178      * setProviderParameter()
0179      *
0180      * @param string $parameterName
0181      * @param string $parameterValue
0182      * @return Zend_Tool_Framework_Client_Request
0183      */
0184     public function setProviderParameter($parameterName, $parameterValue)
0185     {
0186         $this->_providerParameters[$parameterName] = $parameterValue;
0187         return $this;
0188     }
0189 
0190     /**
0191      * getProviderParameters()
0192      *
0193      * @return array
0194      */
0195     public function getProviderParameters()
0196     {
0197         return $this->_providerParameters;
0198     }
0199 
0200     /**
0201      * getProviderParameter()
0202      *
0203      * @param string $parameterName
0204      * @return string
0205      */
0206     public function getProviderParameter($parameterName)
0207     {
0208         return (isset($this->_providerParameters[$parameterName])) ? $this->_providerParameters[$parameterName] : null;
0209     }
0210 
0211     /**
0212      * setPretend()
0213      *
0214      * @param bool $pretend
0215      * @return Zend_Tool_Framework_Client_Request
0216      */
0217     public function setPretend($pretend)
0218     {
0219         $this->_isPretend = (bool) $pretend;
0220         return $this;
0221     }
0222 
0223     /**
0224      * isPretend() - Whether or not this is a pretend request
0225      *
0226      * @return bool
0227      */
0228     public function isPretend()
0229     {
0230         return $this->_isPretend;
0231     }
0232 
0233     /**
0234      * setDebug()
0235      *
0236      * @param bool $pretend
0237      * @return Zend_Tool_Framework_Client_Request
0238      */
0239     public function setDebug($debug)
0240     {
0241         $this->_isDebug = (bool) $debug;
0242         return $this;
0243     }
0244 
0245     /**
0246      * isDebug() - Whether or not this is a debug enabled request
0247      *
0248      * @return bool
0249      */
0250     public function isDebug()
0251     {
0252         return $this->_isDebug;
0253     }
0254 
0255     /**
0256      * setVerbose()
0257      *
0258      * @param bool $verbose
0259      * @return Zend_Tool_Framework_Client_Request
0260      */
0261     public function setVerbose($verbose)
0262     {
0263         $this->_isVerbose = (bool) $verbose;
0264         return $this;
0265     }
0266 
0267     /**
0268      * isVerbose() - Whether or not this is a verbose enabled request
0269      *
0270      * @return bool
0271      */
0272     public function isVerbose()
0273     {
0274         return $this->_isVerbose;
0275     }
0276 
0277     /**
0278      * setDispatchable()
0279      *
0280      * @param bool $dispatchable
0281      * @return Zend_Tool_Framework_Client_Request
0282      */
0283     public function setDispatchable($dispatchable)
0284     {
0285         $this->_isDispatchable = (bool) $dispatchable;
0286         return $this;
0287     }
0288 
0289     /**
0290      * isDispatchable() Is this request Dispatchable?
0291      *
0292      * @return bool
0293      */
0294     public function isDispatchable()
0295     {
0296         return $this->_isDispatchable;
0297     }
0298 
0299 }