Skip to content

Commit 7dcb2a0

Browse files
committed
add interface
1 parent bc87504 commit 7dcb2a0

5 files changed

Lines changed: 40 additions & 5 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php namespace EvolutionCMS\DocumentManager\Interfaces;
2+
3+
use Illuminate\Database\Eloquent\Model;
4+
5+
interface DocumentServiceInterface
6+
{
7+
/**
8+
* @param array $data
9+
* @param bool $events
10+
* @param bool $cache
11+
*/
12+
public function __construct(array $data, bool $events, bool $cache);
13+
14+
/**
15+
* @return Model
16+
*/
17+
public function process();
18+
19+
/**
20+
* @return array
21+
*/
22+
public function getValidationRules(): array;
23+
24+
/**
25+
* @return array
26+
*/
27+
public function getValidationMessages(): array;
28+
29+
/**
30+
* @return bool
31+
*/
32+
public function checkRules(): bool;
33+
34+
/**
35+
* @return bool
36+
*/
37+
public function validate(): bool;
38+
}

src/Services/Documents/DocumentCreate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php namespace EvolutionCMS\DocumentManager\Services\Documents;
22

3+
use EvolutionCMS\DocumentManager\Interfaces\DocumentServiceInterface;
34
use EvolutionCMS\Exceptions\ServiceActionException;
45
use EvolutionCMS\Exceptions\ServiceValidationException;
5-
use EvolutionCMS\Interfaces\ServiceInterface;
66
use EvolutionCMS\Models\SiteContent;
77
use EvolutionCMS\Models\SiteTmplvarTemplate;
88
use \EvolutionCMS\Models\User;
99
use Illuminate\Support\Facades\Lang;
1010

11-
class DocumentCreate implements ServiceInterface
11+
class DocumentCreate implements DocumentServiceInterface
1212
{
1313
/**
1414
* @var \string[][]

src/Services/Documents/DocumentSetGroups.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
use EvolutionCMS\Exceptions\ServiceActionException;
44
use EvolutionCMS\Exceptions\ServiceValidationException;
5-
use EvolutionCMS\Interfaces\ServiceInterface;
65
use EvolutionCMS\Models\SiteContent;
76
use EvolutionCMS\Models\SiteTmplvarTemplate;
87
use \EvolutionCMS\Models\User;

src/Services/Documents/DocumentUndelete.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
use EvolutionCMS\Exceptions\ServiceActionException;
44
use EvolutionCMS\Exceptions\ServiceValidationException;
5-
use EvolutionCMS\Interfaces\ServiceInterface;
65
use EvolutionCMS\Models\SiteContent;
76
use EvolutionCMS\Models\SiteTmplvarTemplate;
87
use \EvolutionCMS\Models\User;

src/Services/Documents/DocumentUnpublish.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
use EvolutionCMS\Exceptions\ServiceActionException;
44
use EvolutionCMS\Exceptions\ServiceValidationException;
5-
use EvolutionCMS\Interfaces\ServiceInterface;
65
use EvolutionCMS\Models\SiteContent;
76
use EvolutionCMS\Models\SiteTmplvarTemplate;
87
use \EvolutionCMS\Models\User;

0 commit comments

Comments
 (0)