Loading code/template/FormAwareTrait.php +4 −4 Changes for code/template/FormAwareTrait.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -12,16 +12,16 @@ namespace <namespace>; */ trait <classname> { protected ?<targetClassname> $<variable>; protected ?<targetClassname> $<variable> = null; /** * @param <targetClassname>|null $<variable> * @param <targetClassname> $<variable> * * @return self */ public function set<method>( ?<targetClassname> $<variable> ) public function set<method>( <targetClassname> $<variable> ) { $this-><variable> = $<variable>; Loading @@ -32,7 +32,7 @@ trait <classname> public function get<method>(): ?<targetClassname> { if (!$this-><variable>){ if (empty($this-><variable>)){ $this-><variable> = \Application::$container->get('FormElementManager')->get(<targetClassname>::class); } Loading code/template/ServiceAwareTrait.php +4 −4 Changes for code/template/ServiceAwareTrait.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -12,16 +12,16 @@ namespace <namespace>; */ trait <classname> { protected ?<targetClassname> $<variable>; protected ?<targetClassname> $<variable> = null; /** * @param <targetClassname>|null $<variable> * @param <targetClassname> $<variable> * * @return self */ public function set<method>( ?<targetClassname> $<variable> ) public function set<method>( <targetClassname> $<variable> ) { $this-><variable> = $<variable>; Loading @@ -32,7 +32,7 @@ trait <classname> public function get<method>(): ?<targetClassname> { if (!$this-><variable>){ if (empty($this-><variable>)){ $this-><variable> = \Application::$container->get(<targetClassname>::class); } Loading code/test6.php +4 −4 Changes for code/test6.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -11,19 +11,19 @@ $introspection = \UnicaenCode\Util::introspection(); //$traits = $introspection->getTraits(); $traits = [\Application\Form\CentreCout\Traits\CentreCoutSaisieFormAwareTrait::class]; $traits = $introspection->getTraits(); //$traits = [\Application\Form\CentreCout\Traits\CentreCoutSaisieFormAwareTrait::class]; foreach ($traits as $trait) { $params = $introspection->getTraitParams($trait); if ($params['aware']) { if ($params['targetClass']) { \UnicaenCode\Util::codeGenerator()->generer('awareTrait', [ /* \UnicaenCode\Util::codeGenerator()->generer('awareTrait', [ 'class' => $params['targetClass'], 'useGetter' => true, 'subDir' => $params['subDir'], 'expanded' => false, ]); ]);*/ } else { echo "ATTENTION : Le trait $trait ne fait référence à aucune classe connue et identifiée<br />\n"; } Loading config/autoload/unicaen-code.global.php +1 −1 Changes for config/autoload/unicaen-code.global.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ $settings = [ 'triggers' => [ [ 'template' => 'AwareTrait', 'type' => ['Service', 'Hydrator', 'Provider', 'Processus'], 'type' => ['Service', 'Hydrator', 'Provider', 'Processus', 'Connecteur'], 'generator' => function (array $params): array { $params['template'] = 'ServiceAwareTrait'; Loading module/Application/src/Connecteur/Bdd/BddConnecteurAwareTrait.php +15 −14 Changes for module/Application/src/Connecteur/Bdd/BddConnecteurAwareTrait.php: 15 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -3,32 +3,33 @@ namespace Application\Connecteur\Bdd; trait BddConnecteurAwareTrait { /** * @var BddConnecteur * Description of BddConnecteurAwareTrait * * @author UnicaenCode */ private $bdd; public function getBdd(): BddConnecteur trait BddConnecteurAwareTrait { return $this->bdd; } protected ?BddConnecteur $connecteurBddBdd; /** * @param BddConnecteur $bdd * @param BddConnecteur|null $connecteurBddBdd * * @return BddConnecteurAwareTrait * @return self */ public function setBdd($bdd) public function setConnecteurBddBdd( ?BddConnecteur $connecteurBddBdd ) { $this->bdd = $bdd; $this->connecteurBddBdd = $connecteurBddBdd; return $this; } public function getConnecteurBddBdd(): ?BddConnecteur { return $this->connecteurBddBdd; } } No newline at end of file Loading
code/template/FormAwareTrait.php +4 −4 Changes for code/template/FormAwareTrait.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -12,16 +12,16 @@ namespace <namespace>; */ trait <classname> { protected ?<targetClassname> $<variable>; protected ?<targetClassname> $<variable> = null; /** * @param <targetClassname>|null $<variable> * @param <targetClassname> $<variable> * * @return self */ public function set<method>( ?<targetClassname> $<variable> ) public function set<method>( <targetClassname> $<variable> ) { $this-><variable> = $<variable>; Loading @@ -32,7 +32,7 @@ trait <classname> public function get<method>(): ?<targetClassname> { if (!$this-><variable>){ if (empty($this-><variable>)){ $this-><variable> = \Application::$container->get('FormElementManager')->get(<targetClassname>::class); } Loading
code/template/ServiceAwareTrait.php +4 −4 Changes for code/template/ServiceAwareTrait.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -12,16 +12,16 @@ namespace <namespace>; */ trait <classname> { protected ?<targetClassname> $<variable>; protected ?<targetClassname> $<variable> = null; /** * @param <targetClassname>|null $<variable> * @param <targetClassname> $<variable> * * @return self */ public function set<method>( ?<targetClassname> $<variable> ) public function set<method>( <targetClassname> $<variable> ) { $this-><variable> = $<variable>; Loading @@ -32,7 +32,7 @@ trait <classname> public function get<method>(): ?<targetClassname> { if (!$this-><variable>){ if (empty($this-><variable>)){ $this-><variable> = \Application::$container->get(<targetClassname>::class); } Loading
code/test6.php +4 −4 Changes for code/test6.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -11,19 +11,19 @@ $introspection = \UnicaenCode\Util::introspection(); //$traits = $introspection->getTraits(); $traits = [\Application\Form\CentreCout\Traits\CentreCoutSaisieFormAwareTrait::class]; $traits = $introspection->getTraits(); //$traits = [\Application\Form\CentreCout\Traits\CentreCoutSaisieFormAwareTrait::class]; foreach ($traits as $trait) { $params = $introspection->getTraitParams($trait); if ($params['aware']) { if ($params['targetClass']) { \UnicaenCode\Util::codeGenerator()->generer('awareTrait', [ /* \UnicaenCode\Util::codeGenerator()->generer('awareTrait', [ 'class' => $params['targetClass'], 'useGetter' => true, 'subDir' => $params['subDir'], 'expanded' => false, ]); ]);*/ } else { echo "ATTENTION : Le trait $trait ne fait référence à aucune classe connue et identifiée<br />\n"; } Loading
config/autoload/unicaen-code.global.php +1 −1 Changes for config/autoload/unicaen-code.global.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ $settings = [ 'triggers' => [ [ 'template' => 'AwareTrait', 'type' => ['Service', 'Hydrator', 'Provider', 'Processus'], 'type' => ['Service', 'Hydrator', 'Provider', 'Processus', 'Connecteur'], 'generator' => function (array $params): array { $params['template'] = 'ServiceAwareTrait'; Loading
module/Application/src/Connecteur/Bdd/BddConnecteurAwareTrait.php +15 −14 Changes for module/Application/src/Connecteur/Bdd/BddConnecteurAwareTrait.php: 15 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -3,32 +3,33 @@ namespace Application\Connecteur\Bdd; trait BddConnecteurAwareTrait { /** * @var BddConnecteur * Description of BddConnecteurAwareTrait * * @author UnicaenCode */ private $bdd; public function getBdd(): BddConnecteur trait BddConnecteurAwareTrait { return $this->bdd; } protected ?BddConnecteur $connecteurBddBdd; /** * @param BddConnecteur $bdd * @param BddConnecteur|null $connecteurBddBdd * * @return BddConnecteurAwareTrait * @return self */ public function setBdd($bdd) public function setConnecteurBddBdd( ?BddConnecteur $connecteurBddBdd ) { $this->bdd = $bdd; $this->connecteurBddBdd = $connecteurBddBdd; return $this; } public function getConnecteurBddBdd(): ?BddConnecteur { return $this->connecteurBddBdd; } } No newline at end of file