当前位置: 首页>>代码示例>>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;未经允许,请勿转载。