1 | <?php |
||
13 | abstract class AbstractType extends \SwaggerGen\Swagger\AbstractObject |
||
14 | { |
||
15 | |||
16 | const REGEX_START = '/^'; |
||
17 | const REGEX_FORMAT = '([a-z][a-z0-9]*)'; |
||
18 | const REGEX_CONTENT = '(?:\((.*)\))?'; |
||
19 | const REGEX_RANGE = '(?:([[<])(\\d*),(\\d*)([\\]>]))?'; |
||
20 | const REGEX_DEFAULT = '(?:=(.+))?'; |
||
21 | const REGEX_END = '$/i'; |
||
22 | |||
23 | private $example = null; |
||
24 | |||
25 | protected static function swap(&$a, &$b) |
||
31 | |||
32 | /** |
||
33 | * @var string $definition |
||
34 | */ |
||
35 | public function __construct(\SwaggerGen\Swagger\AbstractObject $parent, $definition) |
||
41 | |||
42 | abstract protected function parseDefinition($definition); |
||
43 | |||
44 | /** |
||
45 | * Overwrites default AbstractObject parser, since Types should not handle |
||
46 | * extensions themselves. |
||
47 | * |
||
48 | * @param string $command |
||
49 | * @param string $data |
||
50 | * @return \SwaggerGen\Swagger\Type\AbstractType|boolean |
||
51 | */ |
||
52 | public function handleCommand($command, $data = null) |
||
69 | |||
70 | public function toArray() |
||
76 | |||
77 | } |
||
78 |