当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractObject::toArray方法代码示例

本文整理汇总了PHP中AbstractObject::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractObject::toArray方法的具体用法?PHP AbstractObject::toArray怎么用?PHP AbstractObject::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AbstractObject的用法示例。


在下文中一共展示了AbstractObject::toArray方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: toArray

 public function toArray()
 {
     uksort($this->operations, function ($a, $b) {
         return array_search($a, self::$methods) - array_search($b, self::$methods);
     });
     return self::array_filter_null(array_merge(self::array_toArray($this->operations), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:7,代码来源:Path.php

示例2: toArray

 public function toArray()
 {
     return self::array_filter_null(array_merge(array('title' => $this->title, 'description' => $this->description, 'termsOfService' => $this->termsofservice, 'contact' => $this->contact ? $this->contact->toArray() : null, 'license' => $this->license ? $this->license->toArray() : null, 'version' => $this->version), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:4,代码来源:Info.php

示例3: toArray

 public function toArray()
 {
     return self::array_filter_null(array_merge(array('name' => $this->name, 'in' => $this->in === 'form' ? 'formData' : $this->in, 'description' => $this->description, 'required' => $this->in === 'path' || $this->required ? 'true' : null), $this->Type->toArray(), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:4,代码来源:Parameter.php

示例4: toArray

 public function toArray()
 {
     return self::array_filter_null(array_merge(array('url' => $this->url, 'description' => empty($this->description) ? null : $this->description), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:4,代码来源:ExternalDocumentation.php

示例5: toArray

 public function toArray()
 {
     return self::array_filter_null(array_merge(array('type' => $this->type, 'description' => $this->description), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:4,代码来源:Header.php

示例6: toArray

 public function toArray()
 {
     return self::array_filter_null(array_merge(array('name' => $this->name, 'in' => 'body', 'description' => $this->description, 'required' => $this->required ? 'true' : null, 'schema' => $this->schema->toArray()), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:4,代码来源:BodyParameter.php

示例7: toArray

 /**
  * Convert object into an array;
  *
  * @return array
  */
 public function toArray()
 {
     $return = parent::toArray();
     var_dump($return['totalVatAmount']);
     return $return;
 }
开发者ID:cleentfaar,项目名称:docdata-orderapi,代码行数:11,代码来源:Invoice.php

示例8: toArray

 /**
  * Convert object into an array;
  *
  * @return array
  */
 public function toArray()
 {
     $return = parent::toArray();
     $return['totalNetAmount'] = $return['quantity']['_'] * $return['netAmount']['_'];
     $return['totalGrossAmount'] = $return['quantity']['_'] * $return['grossAmount']['_'];
     $return['totalVat'] = $return['quantity']['_'] * $return['vat']['amount']['_'];
     return $return;
 }
开发者ID:cleentfaar,项目名称:docdata-orderapi,代码行数:13,代码来源:Item.php

示例9: toArray

 public function toArray()
 {
     return self::array_filter_null(array_merge(array('type' => $this->type === 'apikey' ? 'apiKey' : $this->type, 'description' => empty($this->description) ? null : $this->description, 'name' => $this->name, 'in' => $this->in, 'flow' => $this->flow === 'accesscode' ? 'accessCode' : $this->flow, 'authorizationUrl' => $this->authorizationUrl, 'tokenUrl' => $this->tokenUrl, 'scopes' => $this->scopes), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:4,代码来源:SecurityScheme.php

示例10: toArray

 /**
  * @return array
  */
 public function toArray()
 {
     return self::array_filter_null(array_merge(array('externalDocs' => $this->externalDocs ? $this->externalDocs->toArray() : null), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:7,代码来源:AbstractDocumentableObject.php

示例11: toArray

 /**
  * @param  array $options
  * @return array
  * @see    AbstractObject::toArray()
  * @ignore
  */
 public function toArray($options = array())
 {
     !isset($options['include_null']) && ($options['include_null'] = false);
     return parent::toArray($options);
 }
开发者ID:sidorkin-yegor,项目名称:beerfortextbook,代码行数:11,代码来源:Signer.php

示例12: toArray

 public function toArray()
 {
     return self::array_filter_null(array_merge(array('description' => $this->description, 'schema' => $this->schema ? $this->schema->toArray() : null, 'headers' => self::array_toArray($this->Headers)), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:4,代码来源:Response.php

示例13: toArray

 public function toArray()
 {
     return self::array_filter_null(array_merge(array('name' => $this->name, 'url' => $this->url, 'email' => $this->email), parent::toArray()));
 }
开发者ID:skystebnicki,项目名称:PHPSwaggerGen,代码行数:4,代码来源:Contact.php


注:本文中的AbstractObject::toArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。