/** * gets schema formatted content * * @return string */ public function getContent() { $schemaDefinition = $this->schema->toArray(); $content = \Dive\Util\VarExport::export($schemaDefinition, array('removeLastComma' => true)); $content = "<?php\n\nreturn {$content};"; return $content; }
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())); }