當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommandInterface::getResponse方法代碼示例

本文整理匯總了PHP中Guzzle\Service\Command\CommandInterface::getResponse方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommandInterface::getResponse方法的具體用法?PHP CommandInterface::getResponse怎麽用?PHP CommandInterface::getResponse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Guzzle\Service\Command\CommandInterface的用法示例。


在下文中一共展示了CommandInterface::getResponse方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: fromCommand

 /**
  * Create a new model instance from a command.
  *
  * @param  CommandInterface
  * @return array
  */
 public static function fromCommand(CommandInterface $command)
 {
     $file = new self();
     $file->setParameters($command->getResponse()->json() + array('path' => $command['path']));
     $file->finishUpload();
     return $file->getParameters();
 }
開發者ID:tvpsoft,項目名稱:laravel-kinvey,代碼行數:13,代碼來源:KinveyFileResponse.php

示例2: factory

 /**
  * {@inheritdoc}
  */
 public function factory(CommandInterface $originalCommand, array $data)
 {
     $command = $this->newCommand();
     // set up embedded command
     $command->setClient($originalCommand->getClient());
     $originalResponse = $originalCommand->getResponse();
     $response = $this->createResponse($originalResponse, $data);
     $command->setResponse($response);
     return $command;
 }
開發者ID:kameshwariv,項目名稱:testexample,代碼行數:13,代碼來源:EmbeddedCommandFactory.php

示例3: before

 /**
  * {@inheritdoc}
  */
 public function before(CommandInterface $command, array &$result)
 {
     $json = $command->getResponse()->json();
     // store links to use later
     if (array_key_exists(self::ELEMENT, $json)) {
         $this->set($command, 'links', $json[self::ELEMENT]);
     }
     // create new array of links which visit() adds to
     $result[self::ELEMENT] = array();
 }
開發者ID:kameshwariv,項目名稱:testexample,代碼行數:13,代碼來源:LinksVisitor.php

示例4: before

 /**
  * {@inheritdoc}
  */
 public function before(CommandInterface $command, array &$result)
 {
     $json = $command->getResponse()->json();
     // store links to use later
     if (array_key_exists($this->getOutputFieldName(), $json)) {
         $this->set($command, $this->getFieldName(), $json[$this->getOutputFieldName()]);
     }
     // create new array of links which visit() adds to
     $result[$this->getOutputFieldName()] = array();
 }
開發者ID:dh-open,項目名稱:desk-php,代碼行數:13,代碼來源:AbstractVisitor.php

示例5: before

 public function before(CommandInterface $command, array &$result)
 {
     // Set the result of the command to the array conversion of the XML body
     $result = json_decode(json_encode($command->getResponse()->xml()), true);
 }
開發者ID:creazy412,項目名稱:vmware-win10-c65-drupal7,代碼行數:5,代碼來源:XmlVisitor.php

示例6: before

public function before(CommandInterface $command, array &$result)
{

 $result = json_decode(json_encode($command->getResponse()->xml()), true);
}
開發者ID:Ryu0621,項目名稱:SaNaVi,代碼行數:5,代碼來源:XmlVisitor.php

示例7: before

 public function before(CommandInterface $command, array &$result)
 {
     // Ensure that the result of the command is always rooted with the parsed JSON data
     $result = $command->getResponse()->json();
 }
開發者ID:jorjoh,項目名稱:Varden,代碼行數:5,代碼來源:JsonVisitor.php

示例8: before

 /**
  * {@inheritdoc}
  */
 public function before(CommandInterface $command, array &$result)
 {
     // Set the result of the command to the array conversion of the XML body
     $result = get_object_vars($command->getResponse()->xml());
 }
開發者ID:kameshwariv,項目名稱:testexample,代碼行數:8,代碼來源:XmlVisitor.php


注:本文中的Guzzle\Service\Command\CommandInterface::getResponse方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。