芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/apv.mgaplay.com.br/vendor/xibosignage/oauth2-xibo-cms/src/Entity/XiboCommand.php
doGet($this->url, $params); foreach ($response as $item) { $entries[] = clone $this->hydrate($item); } return $entries; } /** * @param $id * @return XiboCommand * @throws XiboApiException */ public function getById($id) { $response = $this->doGet($this->url, [ 'commandId' => $id ]); if (count($response) <= 0) throw new XiboApiException('Expecting a single record, found ' . count($response)); return clone $this->hydrate($response[0]); } /** * Create * @param $name * @param $description * @param $code * @return XiboCommand */ public function create($name, $description, $code) { $this->userId = $this->getEntityProvider()->getMe()->getId(); $this->command = $name; $this->description = $description; $this->code = $code; $response = $this->doPost('/command', $this->toArray()); return $this->hydrate($response); } /** * Edit * @param $name * @param $description * @param $code * @return XiboCommand */ public function edit($name, $description, $code) { $this->command = $name; $this->description = $description; $this->code = $code; $response = $this->doPut('/command/' . $this->commandId, $this->toArray()); return $this->hydrate($response); } /** * Delete * @return bool */ public function delete() { $this->doDelete('/command/' . $this->commandId); return true; } }