示例#1
0
 private function stockLocation(array $data)
 {
     $this->location = isset($data['location']) ? $data['location'] : self::DEFAULT_LOCATION;
     if (!AbstractParams::isSupportedLocation($this->location)) {
         throw new \RuntimeException(sprintf("%s is not a permitted location", $this->location));
     }
 }
示例#2
0
 public function urlId(string $type) : array
 {
     return array_merge(parent::id($type), ['required' => true, 'location' => self::URL, 'documented' => false]);
 }
示例#3
0
 public function snapshotName() : array
 {
     return parent::name('snapshot') + ['type' => self::STRING_TYPE, 'location' => self::JSON];
 }
示例#4
0
 public function urlId($type) : array
 {
     return array_merge(parent::id($type), ['required' => true, 'location' => self::URL]);
 }