mirror of https://github.com/flightphp/core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
456 B
23 lines
456 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use flight\template\Component;
|
|
|
|
return new class($name, $occupation) extends Component
|
|
{
|
|
private string $name;
|
|
private string $occupation;
|
|
|
|
public function __construct(string $name, string $occupation)
|
|
{
|
|
$this->name = $name;
|
|
$this->occupation = $occupation;
|
|
}
|
|
|
|
public function html(): string
|
|
{
|
|
return "class-component-with-props: $this->occupation $this->name";
|
|
}
|
|
};
|