PluginProbe
Yatra – Travel Booking & Tour Operator Software / trunk
Yatra – Travel Booking & Tour Operator Software vtrunk
3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 2.0.11 All 82 releases
yatra / app / Contracts / ServiceInterface.php

ServiceInterface.php in Yatra – Travel Booking & Tour Operator Software trunk, at app/Contracts/ServiceInterface.php

49 lines 858 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Yatra\Contracts;
6
7 /**
8 * Service Interface
9 *
10 * Defines standard contract for all service classes
11 */
12 interface ServiceInterface
13 {
14 /**
15 * Get item by ID
16 */
17 public function getById(int $id): ?\stdClass;
18
19 /**
20 * Get all items with filters
21 */
22 public function getAll(array $filters = []): array;
23
24 /**
25 * Create new item
26 */
27 public function create(array $data): int;
28
29 /**
30 * Update existing item
31 */
32 public function update(int $id, array $data): bool;
33
34 /**
35 * Delete item
36 */
37 public function delete(int $id): bool;
38
39 /**
40 * Validate data for creation
41 */
42 public function validateCreate(array $data): void;
43
44 /**
45 * Validate data for update
46 */
47 public function validateUpdate(int $id, array $data): void;
48 }
49