mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Implemented more layers
This commit is contained in:
parent
19dd487c91
commit
36f8e597f7
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\API\Meta;
|
||||
|
||||
use App\Controller\API\AbstractAPIController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class HeredityApiController extends AbstractAPIController
|
||||
{
|
||||
public function read(Request $request, $identifier): Response
|
||||
{
|
||||
}
|
||||
|
||||
public function create(Request $request): Response
|
||||
{
|
||||
}
|
||||
|
||||
public function update(Request $request, $identifier): Response
|
||||
{
|
||||
}
|
||||
|
||||
public function list(Request $request): Response
|
||||
{
|
||||
}
|
||||
|
||||
public function delete(Request $request, $identifier): Response
|
||||
{
|
||||
}
|
||||
}
|
30
application/src/Controller/API/Meta/MemberApiController.php
Normal file
30
application/src/Controller/API/Meta/MemberApiController.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\API\Meta;
|
||||
|
||||
use App\Controller\API\AbstractAPIController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class MemberApiController extends AbstractAPIController
|
||||
{
|
||||
public function read(Request $request, $identifier): Response
|
||||
{
|
||||
}
|
||||
|
||||
public function create(Request $request): Response
|
||||
{
|
||||
}
|
||||
|
||||
public function update(Request $request, $identifier): Response
|
||||
{
|
||||
}
|
||||
|
||||
public function list(Request $request): Response
|
||||
{
|
||||
}
|
||||
|
||||
public function delete(Request $request, $identifier): Response
|
||||
{
|
||||
}
|
||||
}
|
@ -9,7 +9,9 @@ use Fresh\DoctrineEnumBundle\DBAL\Types\AbstractEnumType;
|
||||
*/
|
||||
final class LayerType extends AbstractEnumType
|
||||
{
|
||||
public const RELATION = 'relation';
|
||||
public const HEREDITY = 'heredity';
|
||||
|
||||
public const RIGHT = 'right';
|
||||
|
||||
public const SOURCE = 'source';
|
||||
|
||||
@ -17,9 +19,14 @@ final class LayerType extends AbstractEnumType
|
||||
|
||||
public const MEMBER = 'member';
|
||||
|
||||
/**
|
||||
* @var array Ordered by the importants of implementation
|
||||
*/
|
||||
protected static $choices = [
|
||||
self::RELATION => 'relation',
|
||||
self::LAW => 'law',
|
||||
self::SOURCE => 'source',
|
||||
self::LAW => 'law',
|
||||
self::RIGHT => 'right',
|
||||
self::MEMBER => 'member',
|
||||
self::HEREDITY => 'heredity',
|
||||
];
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class RightCheckerTest extends TestCase
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->layer = LayerType::RELATION;
|
||||
$this->layer = LayerType::MEMBER;
|
||||
$this->type = CRUDType::READ;
|
||||
$this->source = new PureSource();
|
||||
$this->right = new Right();
|
||||
|
@ -29,11 +29,7 @@ class LayerAttributTest extends TestCase
|
||||
|
||||
public function testAccessors(): void
|
||||
{
|
||||
foreach ([
|
||||
LayerType::LAW,
|
||||
LayerType::RELATION,
|
||||
LayerType::SOURCE,
|
||||
] as $value) {
|
||||
foreach (LayerType::getChoices() as $value) {
|
||||
$this->assertNull($this->layer->setLayer($value));
|
||||
$this->assertEquals($value, $this->layer->getLayer());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user