henrik / component
2.3
2024-07-07 06:27 UTC
Requires
- php: >=8.2
Requires (Dev)
- friendsofphp/php-cs-fixer: dev-master
- phpmd/phpmd: ^2.15
- phpstan/phpstan: 2.0.x-dev
README
Here is the example hpw to use component
use Henrik\Component\Component; require "../vendor/autoload.php"; class Simple extends Component{ private int $x; /** * @return int */ public function getX(): int { return $this->x; } /** * @param int $x */ public function setX(int $x): void { $this->x = $x; } } $simple = new Simple(); $simple->x = 45; //accessing the private property of `Simple` class by getter and setter echo $simple->x;