public function transform(\Entity\User $user) { return ['id' => (int) $user->getUserId(), 'email' => $user->getEmail(), 'name' => $user->getName(), 'active' => $user->getActive(), 'group' => $user->getGroup(), 'links' => ['rel' => 'self', 'uri' => \Util\SlimUtil::absoluteUrlFor('user_by_id', ['id' => $user->getUserId()]), 'method' => 'GET']]; }
public function transform(\Entity\Equipment $equipment) { return ['equipment_id' => (int) $equipment->getEquipmentId(), 'area_id' => (int) $equipment->getAreaId(), 'name' => $equipment->getName(), 'links' => ['rel' => 'self', 'uri' => \Util\SlimUtil::absoluteUrlFor('equipment_by_id', ['id' => $equipment->getEquipmentId()]), 'method' => 'GET']]; }
public function transform(\Entity\Brand $brand) { return ['id' => (int) $brand->getBrandId(), 'name' => $brand->getName(), 'links' => ['rel' => 'self', 'uri' => \Util\SlimUtil::absoluteUrlFor('brand_by_id', ['id' => $brand->getBrandId()]), 'method' => 'GET']]; }
public function transform(\Entity\Event $event) { return ['id' => (int) $event->getId(), 'equipment_id' => (int) $event->getEquipmentId(), 'user_id' => (int) $event->getUserId(), 'create_timestamp' => $event->getTimestamp(), 'description' => $event->getDescription(), 'type' => $event->getType(), 'time' => $event->getTime(), 'links' => ['rel' => 'self', 'uri' => \Util\SlimUtil::absoluteUrlFor('list_events_by_id', ['id' => $event->getId()]), 'method' => 'GET']]; }
public function transform(\Entity\Area $area) { return ['id' => (int) $area->getAreaId(), 'name' => $area->getName(), 'links' => ['rel' => 'self', 'uri' => \Util\SlimUtil::absoluteUrlFor('area_by_id', ['id' => $area->getAreaId()]), 'method' => 'GET']]; }