Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Contracts/Repository/EggRepositoryInterface.php
10262 views
1
<?php
2
3
namespace Pterodactyl\Contracts\Repository;
4
5
use Pterodactyl\Models\Egg;
6
use Illuminate\Database\Eloquent\Collection;
7
8
interface EggRepositoryInterface extends RepositoryInterface
9
{
10
/**
11
* Return an egg with the variables relation attached.
12
*
13
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
14
*/
15
public function getWithVariables(int $id): Egg;
16
17
/**
18
* Return all eggs and their relations to be used in the daemon API.
19
*/
20
public function getAllWithCopyAttributes(): Collection;
21
22
/**
23
* Return an egg with the scriptFrom and configFrom relations loaded onto the model.
24
*/
25
public function getWithCopyAttributes(int|string $value, string $column = 'id'): Egg;
26
27
/**
28
* Return all the data needed to export a service.
29
*
30
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
31
*/
32
public function getWithExportAttributes(int $id): Egg;
33
34
/**
35
* Confirm a copy script belongs to the same nest as the item trying to use it.
36
*/
37
public function isCopyableScript(int $copyFromId, int $service): bool;
38
}
39
40