mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Optimized entities
This commit is contained in:
		| @@ -19,8 +19,7 @@ abstract class AbstractSource implements SourceInterface | ||||
| { | ||||
|     use IdAttribut,NodeAttribut; | ||||
|  | ||||
|     /** | ||||
|      * @var ConfigurationInterface | ||||
|      */ | ||||
|     protected $configuration; | ||||
|     public function __construct(){ | ||||
|         $this->node = new Node(); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -11,7 +11,7 @@ trait NodeAttribut | ||||
| { | ||||
|     /** | ||||
|      * @var NodeInterface | ||||
|      * @ORM\OneToOne(targetEntity="Node") | ||||
|      * @ORM\OneToOne(targetEntity="Node",cascade={"persist", "remove"}) | ||||
|      * @ORM\JoinColumn(name="node_id", referencedColumnName="id") | ||||
|      */ | ||||
|     protected $node; | ||||
|   | ||||
| @@ -1,48 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| class Configuration implements ConfigurationInterface | ||||
| { | ||||
|     /** | ||||
|      * @var PropertyInterface | ||||
|      */ | ||||
|     protected $read; | ||||
|  | ||||
|     /** | ||||
|      * @var PropertyInterface | ||||
|      */ | ||||
|     protected $write; | ||||
|  | ||||
|     /** | ||||
|      * @var PropertyInterface | ||||
|      */ | ||||
|     protected $administrate; | ||||
|  | ||||
|     public function setAdministrate(Property $administrate): void | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getAdministrate(): Property | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function setWrite(Property $write): void | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getWrite(): Property | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function setRead(Property $read): void | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getRead(): Property | ||||
|     { | ||||
|     } | ||||
| } | ||||
| @@ -1,23 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
|  | ||||
| /** | ||||
|  * This class is not a source! | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| interface ConfigurationInterface | ||||
| { | ||||
|     public function setRead(Property $read): void; | ||||
|  | ||||
|     public function getRead(): Property; | ||||
|  | ||||
|     public function setWrite(Property $write): void; | ||||
|  | ||||
|     public function getWrite(): Property; | ||||
|  | ||||
|     public function setAdministrate(Property $administrate): void; | ||||
|  | ||||
|     public function getAdministrate(): Property; | ||||
| } | ||||
| @@ -1,29 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
|  | ||||
| use Doctrine\Common\Collections\ArrayCollection; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| class Property implements PropertyInterface | ||||
| { | ||||
|     /** | ||||
|      * @var ArrayCollection|NodeInterface[] | ||||
|      */ | ||||
|     protected $whitelist; | ||||
|  | ||||
|     /** | ||||
|      * @var ArrayCollection|NodeInterface[] | ||||
|      */ | ||||
|     protected $blacklist; | ||||
|  | ||||
|     public function getLegitimated(): ArrayCollection | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function isLegitimated(SourceInterface $source): bool | ||||
|     { | ||||
|     } | ||||
| } | ||||
| @@ -1,15 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
|  | ||||
| use Doctrine\Common\Collections\ArrayCollection; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| interface PropertyInterface | ||||
| { | ||||
|     public function isLegitimated(SourceInterface $source): bool; | ||||
|  | ||||
|     public function getLegitimated(): ArrayCollection; | ||||
| } | ||||
| @@ -45,5 +45,6 @@ class User extends BaseUser implements SourceInterface | ||||
|          * @var \App\Entity\User $isActive | ||||
|          */ | ||||
|         $this->isActive = true; | ||||
|         $this->node = new Node(); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user