Example #1
0
 /**
  * setRegistry()
  *
  * @param \Zend\Tool\Framework\Registry $registry
  * @return \Zend\Tool\Framework\Client\Console\ArgumentParser
  */
 public function setRegistry(Registry $registry)
 {
     // get the client registry
     $this->_registry = $registry;
     // set manifest repository, request, response for easy access
     $this->_manifestRepository = $this->_registry->getManifestRepository();
     $this->_request = $this->_registry->getRequest();
     $this->_response = $this->_registry->getResponse();
     return $this;
 }
Example #2
0
 /**
  * This method should be called in order to "handle" a Tooling Client
  * request that has come to the client that has been implemented.
  */
 public function dispatch()
 {
     $this->initialize();
     try {
         $this->_preDispatch();
         if ($this->_registry->getRequest()->isDispatchable()) {
             if ($this->_registry->getRequest()->getActionName() == null) {
                 throw new Exception('Client failed to setup the action name.');
             }
             if ($this->_registry->getRequest()->getProviderName() == null) {
                 throw new Exception('Client failed to setup the provider name.');
             }
             $this->_handleDispatch();
         }
     } catch (\Exception $exception) {
         $this->_registry->getResponse()->setException($exception);
     }
     $this->_postDispatch();
 }
Example #3
0
 /**
  * setRegistry()
  *
  * @param \Zend\Tool\Framework\Registry $registry
  * @return \Zend\Tool\Framework\Client\Console\HelpSystem
  */
 public function setRegistry(\Zend\Tool\Framework\Registry $registry)
 {
     $this->_registry = $registry;
     $this->_response = $registry->getResponse();
     return $this;
 }