jeyroik / extas-base
Base Extas package
Installs: 4 122
Dependents: 25
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
Requires
Requires (Dev)
- jeyroik/extas-snuffbox: 0.*
- phpstan/phpstan: 0.*
- phpunit/phpunit: ^9
README
Описание
Пакет с базовыми интерфейсами и трейтами с их реализацией.
Tests
# composer run-script test
Usage
use extas\interafces\IHasName; use extas\interafces\IHasDescription; use extas\components\THasName; use extas\components\THasDescription; use extas\components\parameters\THasParameters; use extas\components\Item; class Car extends Item implements IHasName, IHasDescription { use THasName; use THasDescription; } $car = new Car([ Car::FIELD__NAME => 'My car', Car::FIELD__DESCRIPTION => 'This is my car' ]); echo $car->getName(); // 'My car' $car->setName('Not my car'); echo $car->getDescription(); // 'This is my car' $car->setDescription('This is not my car');