PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.11
Yatra – Travel Booking & Tour Operator Software v3.0.11
3.0.15 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 All 83 releases
yatra / app / Contracts / RepositoryInterface.php

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

54 lines 1003 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 * Repository Interface
9 *
10 * Defines standard contract for all repository classes
11 */
12 interface RepositoryInterface
13 {
14 /**
15 * Find record by ID
16 */
17 public function find(int $id): ?\stdClass;
18
19 /**
20 * Get all records with optional filters
21 */
22 public function all(array $filters = []): array;
23
24 /**
25 * Create new record
26 */
27 public function create(array $data): int;
28
29 /**
30 * Update existing record
31 */
32 public function update(int $id, array $data): bool;
33
34 /**
35 * Delete record
36 */
37 public function delete(int $id): bool;
38
39 /**
40 * Count records with optional filters
41 */
42 public function count(array $filters = []): int;
43
44 /**
45 * Check if record exists
46 */
47 public function exists(int $id): bool;
48
49 /**
50 * Get paginated results
51 */
52 public function paginate(int $page = 1, int $perPage = 10, array $filters = []): array;
53 }
54