name = $name; $this->type = $type; $this->public = $public; if ($paging) { $this->addRule('sum', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total number of items available on the server.', 'default' => 0, 'example' => 5, ]); } $this->addRule($key, [ 'type' => $model, 'description' => 'List of '.$key.'.', 'default' => [], 'array' => true, ]); } /** * Get Name * * @return string */ public function getName():string { return $this->name; } /** * Get Collection * * @return string */ public function getType():string { return $this->type; } }