本文整理汇总了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()));
}
示例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()));
}
示例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()));
}
示例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()));
}
示例5: toArray
public function toArray()
{
return self::array_filter_null(array_merge(array('type' => $this->type, 'description' => $this->description), parent::toArray()));
}
示例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()));
}
示例7: toArray
/**
* Convert object into an array;
*
* @return array
*/
public function toArray()
{
$return = parent::toArray();
var_dump($return['totalVatAmount']);
return $return;
}
示例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;
}
示例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()));
}
示例10: toArray
/**
* @return array
*/
public function toArray()
{
return self::array_filter_null(array_merge(array('externalDocs' => $this->externalDocs ? $this->externalDocs->toArray() : null), parent::toArray()));
}
示例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);
}
示例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()));
}
示例13: toArray
public function toArray()
{
return self::array_filter_null(array_merge(array('name' => $this->name, 'url' => $this->url, 'email' => $this->email), parent::toArray()));
}