Ejemplo n.º 1
0
 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()));
 }
Ejemplo n.º 2
0
 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()));
 }
Ejemplo n.º 3
0
 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()));
 }
 public function toArray()
 {
     return self::array_filter_null(array_merge(array('url' => $this->url, 'description' => empty($this->description) ? null : $this->description), parent::toArray()));
 }
Ejemplo n.º 5
0
 public function toArray()
 {
     return self::array_filter_null(array_merge(array('type' => $this->type, 'description' => $this->description), parent::toArray()));
 }
Ejemplo n.º 6
0
 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()));
 }
Ejemplo n.º 7
0
 /**
  * Convert object into an array;
  *
  * @return array
  */
 public function toArray()
 {
     $return = parent::toArray();
     var_dump($return['totalVatAmount']);
     return $return;
 }
Ejemplo n.º 8
0
 /**
  * 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;
 }
Ejemplo n.º 9
0
 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()));
 }
 /**
  * @return array
  */
 public function toArray()
 {
     return self::array_filter_null(array_merge(array('externalDocs' => $this->externalDocs ? $this->externalDocs->toArray() : null), parent::toArray()));
 }
Ejemplo n.º 11
0
 /**
  * @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);
 }
Ejemplo n.º 12
0
 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()));
 }
Ejemplo n.º 13
0
 public function toArray()
 {
     return self::array_filter_null(array_merge(array('name' => $this->name, 'url' => $this->url, 'email' => $this->email), parent::toArray()));
 }