Complete the service option export configuration

This commit is contained in:
Dane Everitt 2017-10-03 20:18:27 -05:00
parent 0d739257a9
commit d608c313c3
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 141 additions and 40 deletions

View file

@ -9,23 +9,29 @@
namespace Pterodactyl\Contracts\Repository;
use Pterodactyl\Models\ServiceOption;
interface ServiceOptionRepositoryInterface extends RepositoryInterface
{
/**
* Return a service option with the variables relation attached.
*
* @param int $id
* @return mixed
* @return \Pterodactyl\Models\ServiceOption
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithVariables($id);
public function getWithVariables(int $id): ServiceOption;
/**
* Return a service option with the copyFrom relation loaded onto the model.
* Return a service option with the scriptFrom and configFrom relations loaded onto the model.
*
* @param int $id
* @return mixed
* @return \Pterodactyl\Models\ServiceOption
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithCopyFrom($id);
public function getWithCopyAttributes(int $id): ServiceOption;
/**
* Confirm a copy script belongs to the same service as the item trying to use it.
@ -34,5 +40,5 @@ interface ServiceOptionRepositoryInterface extends RepositoryInterface
* @param int $service
* @return bool
*/
public function isCopiableScript($copyFromId, $service);
public function isCopiableScript(int $copyFromId, int $service): bool;
}