Пример #1
0
 /**
  * Return the API path for the query
  *
  * @return void
  */
 protected function path()
 {
     if ($this->parent) {
         return $this->parent->path() . '/commands';
     }
     $class = static::$resourceClass;
     $path = $class::$path;
     return $path;
 }
Пример #2
0
 /**
  * Return the API path for the query
  *
  * @return void
  */
 protected function path()
 {
     if ($this->parent) {
         return $this->parent->path() . '/devices';
     }
     $class = static::$resourceClass;
     $path = $class::$path;
     if ($this->catalog) {
         $path .= '/catalog';
     }
     return $path;
 }
Пример #3
0
 /**
  * Return the API path for the query
  *
  * @return void
  */
 protected function path()
 {
     $class = static::$resourceClass;
     return str_replace(':parent_path', $this->parent->path(), $class::$path);
 }
Пример #4
0
 /**
  * Returns the path to the resource
  *
  * @return string
  */
 public function path()
 {
     return str_replace(':parent_path', $this->parent->path(), self::$path) . '/' . $this->id();
 }