cisse / symfony-traits
Symfony Useful Traits
Installs: 367
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.0
- ext-json: *
- doctrine/orm: *
- symfony/http-kernel: ^4.4|^5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.19.2
- phpmd/phpmd: ^2.10.2
- squizlabs/php_codesniffer: ^3.6.0
- dev-master
- 8.0.4
- 8.0.3
- 8.0.2
- 8.0.1
- 8.0.0
- 7.4.6
- 7.4.4
- 7.4.3
- 7.4.2
- 7.4.1
- 7.4.0
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.5.1
- 3.5.0
- 3.4.4
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.1.0
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- v1.9.0
- v1.8.0
- 1.7.4
- 1.7.3
- 1.7.2
- v1.7.1
- v1.7.0
- v1.6.0
- v1.5.1
- V1.5.0
- v1.4.0
- V1.3.0
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- V1.0.1
- V1.0.0
- dev-php8.0
- dev-php7.4
- dev-php7.1
This package is auto-updated.
Last update: 2024-11-05 20:46:13 UTC
README
Symfony Traits is useful trait that will help you easily create your Symfony entities
Installation
Symfony traits uses Composer.
composer require cisse/symfony-traits
Usage
<?php require __DIR__.'/vendor/autoload.php'; use Cisse\Bundle\TraitsBundle\Entity\Annotation\NoUnique\Nullable\Text\AddressTrait; use Cisse\Bundle\TraitsBundle\Entity\Annotation\NoUnique\Nullable\Json\RolesTrait; class Foo{ use AddressTrait; // Declaration use RolesTrait { RolesTrait::__construct as private __constructRoles; } // Declaration with constructor alias public function __construct() { $this->__constructRoles(); // Calling constructor from withing trait } } $foo = new Foo(); $foo->setAddress('your address'); // Return $foo. $foo->getAddress(); // Return address
Notes
This component is a work in progress, and it is target for my own usages. But if you like it feel free to use it ;)
Versions
4.0.4