import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
* @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
|
||||
* @version $Id: InputHandler.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: InputHandler.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -27,20 +27,20 @@
|
||||
*/
|
||||
class Zend_Tool_Framework_Client_Interactive_InputHandler
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Framework_Client_Interactive_InputInterface
|
||||
*/
|
||||
protected $_client = null;
|
||||
|
||||
|
||||
protected $_inputRequest = null;
|
||||
|
||||
|
||||
public function setClient(Zend_Tool_Framework_Client_Interactive_InputInterface $client)
|
||||
{
|
||||
$this->_client = $client;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function setInputRequest($inputRequest)
|
||||
{
|
||||
if (is_string($inputRequest)) {
|
||||
@ -50,25 +50,25 @@ class Zend_Tool_Framework_Client_Interactive_InputHandler
|
||||
require_once 'Zend/Tool/Framework/Client/Exception.php';
|
||||
throw new Zend_Tool_Framework_Client_Exception('promptInteractive() requires either a string or an instance of Zend_Tool_Framework_Client_Interactive_InputRequest.');
|
||||
}
|
||||
|
||||
|
||||
$this->_inputRequest = $inputRequest;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$inputResponse = $this->_client->handleInteractiveInputRequest($this->_inputRequest);
|
||||
|
||||
|
||||
if (is_string($inputResponse)) {
|
||||
require_once 'Zend/Tool/Framework/Client/Interactive/InputResponse.php';
|
||||
$inputResponse = new Zend_Tool_Framework_Client_Interactive_InputResponse($inputResponse);
|
||||
$inputResponse = new Zend_Tool_Framework_Client_Interactive_InputResponse($inputResponse);
|
||||
} elseif (!$inputResponse instanceof Zend_Tool_Framework_Client_Interactive_InputResponse) {
|
||||
require_once 'Zend/Tool/Framework/Client/Exception.php';
|
||||
throw new Zend_Tool_Framework_Client_Exception('The registered $_interactiveCallback for the client must either return a string or an instance of Zend_Tool_Framework_Client_Interactive_InputResponse.');
|
||||
}
|
||||
|
||||
|
||||
return $inputResponse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @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
|
||||
* @version $Id: InputInterface.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: InputInterface.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
interface Zend_Tool_Framework_Client_Interactive_InputInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Handle Interactive Input Request
|
||||
*
|
||||
@ -35,7 +35,7 @@ interface Zend_Tool_Framework_Client_Interactive_InputInterface
|
||||
* @return Zend_Tool_Framework_Client_Interactive_InputResponse|string
|
||||
*/
|
||||
public function handleInteractiveInputRequest(Zend_Tool_Framework_Client_Interactive_InputRequest $inputRequest);
|
||||
|
||||
|
||||
public function getMissingParameterPromptString(Zend_Tool_Framework_Provider_Interface $provider, Zend_Tool_Framework_Action_Interface $actionInterface, $missingParameterName);
|
||||
|
||||
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @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
|
||||
* @version $Id: InputRequest.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: InputRequest.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -28,20 +28,20 @@
|
||||
class Zend_Tool_Framework_Client_Interactive_InputRequest
|
||||
{
|
||||
protected $_content = null;
|
||||
|
||||
|
||||
public function __construct($content = null)
|
||||
{
|
||||
if ($content) {
|
||||
$this->setContent($content);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function setContent($content)
|
||||
{
|
||||
$this->_content = $content;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
return $this->_content;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @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
|
||||
* @version $Id: InputResponse.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: InputResponse.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -27,26 +27,26 @@
|
||||
*/
|
||||
class Zend_Tool_Framework_Client_Interactive_InputResponse
|
||||
{
|
||||
|
||||
|
||||
protected $_content = null;
|
||||
|
||||
|
||||
public function __construct($content = null)
|
||||
{
|
||||
if ($content) {
|
||||
$this->setContent($content);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function setContent($content)
|
||||
{
|
||||
$this->_content = $content;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
return $this->_content;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @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
|
||||
* @version $Id: OutputInterface.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: OutputInterface.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
interface Zend_Tool_Framework_Client_Interactive_OutputInterface
|
||||
{
|
||||
|
||||
|
||||
public function handleInteractiveOutput($string);
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user