web/lib/Zend/Tool/Framework/Metadata/Tool.php
changeset 64 162c1de6545a
parent 19 1c2f13fd785c
child 68 ecaf28ffe26e
equal deleted inserted replaced
63:5b37998e522e 64:162c1de6545a
       
     1 <?php
       
     2 /**
       
     3  * Zend Framework
       
     4  *
       
     5  * LICENSE
       
     6  *
       
     7  * This source file is subject to the new BSD license that is bundled
       
     8  * with this package in the file LICENSE.txt.
       
     9  * It is also available through the world-wide-web at this URL:
       
    10  * http://framework.zend.com/license/new-bsd
       
    11  * If you did not receive a copy of the license and are unable to
       
    12  * obtain it through the world-wide-web, please send an email
       
    13  * to license@zend.com so we can send you a copy immediately.
       
    14  *
       
    15  * @category   Zend
       
    16  * @package    Zend_Tool
       
    17  * @subpackage Framework
       
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    20  * @version    $Id: Tool.php 20096 2010-01-06 02:05:09Z bkarwin $
       
    21  */
       
    22 
       
    23 /**
       
    24  * @see Zend_Tool_Framework_Metadata_Basic
       
    25  */
       
    26 require_once 'Zend/Tool/Framework/Metadata/Basic.php';
       
    27 
       
    28 /**
       
    29  * @category   Zend
       
    30  * @package    Zend_Tool
       
    31  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    32  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    33  */
       
    34 class Zend_Tool_Framework_Metadata_Tool extends Zend_Tool_Framework_Metadata_Basic
       
    35 {
       
    36 
       
    37     /**
       
    38      * @var string
       
    39      */
       
    40     protected $_type = 'Tool';
       
    41 
       
    42     /**#@+
       
    43      * @var string
       
    44      */
       
    45     protected $_clientName    = null;
       
    46     protected $_actionName    = null;
       
    47     protected $_providerName  = null;
       
    48     protected $_specialtyName = null;
       
    49     /**#@-*/
       
    50 
       
    51     /**#@+
       
    52      * @var string
       
    53      */
       
    54     protected $_clientReference = null;
       
    55     protected $_actionReference = null;
       
    56     protected $_providerReference = null;
       
    57     /**#@-*/
       
    58 
       
    59     public function setClientName($clientName)
       
    60     {
       
    61         $this->_clientName = $clientName;
       
    62         return $this;
       
    63     }
       
    64 
       
    65     public function getClientName()
       
    66     {
       
    67         return $this->_clientName;
       
    68     }
       
    69 
       
    70     /**
       
    71      * setActionName()
       
    72      *
       
    73      * @param string $actionName
       
    74      * @return Zend_Tool_Framework_Metadata_Tool
       
    75      */
       
    76     public function setActionName($actionName)
       
    77     {
       
    78         $this->_actionName = $actionName;
       
    79         return $this;
       
    80     }
       
    81 
       
    82     /**
       
    83      * getActionName()
       
    84      *
       
    85      * @return string
       
    86      */
       
    87     public function getActionName()
       
    88     {
       
    89         return $this->_actionName;
       
    90     }
       
    91 
       
    92     /**
       
    93      * setProviderName()
       
    94      *
       
    95      * @param string $providerName
       
    96      * @return Zend_Tool_Framework_Metadata_Tool
       
    97      */
       
    98     public function setProviderName($providerName)
       
    99     {
       
   100         $this->_providerName = $providerName;
       
   101         return $this;
       
   102     }
       
   103 
       
   104     /**
       
   105      * getProviderName()
       
   106      *
       
   107      * @return string
       
   108      */
       
   109     public function getProviderName()
       
   110     {
       
   111         return $this->_providerName;
       
   112     }
       
   113 
       
   114     /**
       
   115      * setSpecialtyName()
       
   116      *
       
   117      * @param string $specialtyName
       
   118      * @return Zend_Tool_Framework_Metadata_Tool
       
   119      */
       
   120     public function setSpecialtyName($specialtyName)
       
   121     {
       
   122         $this->_specialtyName = $specialtyName;
       
   123         return $this;
       
   124     }
       
   125 
       
   126     /**
       
   127      * getSpecialtyName()
       
   128      *
       
   129      * @return string
       
   130      */
       
   131     public function getSpecialtyName()
       
   132     {
       
   133         return $this->_specialtyName;
       
   134     }
       
   135 
       
   136     /**
       
   137      * setClientReference()
       
   138      *
       
   139      * @param Zend_Tool_Framework_Client_Abstract $client
       
   140      * @return Zend_Tool_Framework_Metadata_Tool
       
   141      */
       
   142     public function setClientReference(Zend_Tool_Framework_Client_Abstract $client)
       
   143     {
       
   144         $this->_clientReference = $client;
       
   145         return $this;
       
   146     }
       
   147 
       
   148     /**
       
   149      * getClientReference()
       
   150      *
       
   151      * @return Zend_Tool_Framework_Client_Abstract
       
   152      */
       
   153     public function getClientReference()
       
   154     {
       
   155         return $this->_clientReference;
       
   156     }
       
   157 
       
   158     /**
       
   159      * setActionReference()
       
   160      *
       
   161      * @param Zend_Tool_Framework_Action_Interface $action
       
   162      * @return Zend_Tool_Framework_Metadata_Tool
       
   163      */
       
   164     public function setActionReference(Zend_Tool_Framework_Action_Interface $action)
       
   165     {
       
   166         $this->_actionReference = $action;
       
   167         return $this;
       
   168     }
       
   169 
       
   170     /**
       
   171      * getActionReference()
       
   172      *
       
   173      * @return Zend_Tool_Framework_Action_Interface
       
   174      */
       
   175     public function getActionReference()
       
   176     {
       
   177         return $this->_actionReference;
       
   178     }
       
   179 
       
   180     /**
       
   181      * setProviderReference()
       
   182      *
       
   183      * @param Zend_Tool_Framework_Provider_Interface $provider
       
   184      * @return Zend_Tool_Framework_Metadata_Tool
       
   185      */
       
   186     public function setProviderReference(Zend_Tool_Framework_Provider_Interface $provider)
       
   187     {
       
   188         $this->_providerReference = $provider;
       
   189         return $this;
       
   190     }
       
   191 
       
   192     /**
       
   193      * getProviderReference()
       
   194      *
       
   195      * @return Zend_Tool_Framework_Provider_Interface
       
   196      */
       
   197     public function getProviderReference()
       
   198     {
       
   199         return $this->_providerReference;
       
   200     }
       
   201 
       
   202     /**
       
   203      * __toString() cast to string
       
   204      *
       
   205      * @return string
       
   206      */
       
   207     public function __toString()
       
   208     {
       
   209         $string = parent::__toString();
       
   210         $string .= ' (ProviderName: ' . $this->_providerName
       
   211              . ', ActionName: '     . $this->_actionName
       
   212              . ', SpecialtyName: '  . $this->_specialtyName
       
   213              . ')';
       
   214 
       
   215         return $string;
       
   216     }
       
   217 
       
   218 }