File manager - Edit - /home/linknsbh/cecil-hotel.net/platform/packages/shortcode/src/Compilers/Shortcode.php
Back
<?php namespace Botble\Shortcode\Compilers; class Shortcode { public function __construct( protected string $name, protected array $attributes = [], public string|null $content = null ) { } public function get(string $attribute, string|null $fallback = null): string { $value = $this->{$attribute}; if (! empty($value)) { return $attribute . '="' . $value . '"'; } elseif (! empty($fallback)) { return $attribute . '="' . $fallback . '"'; } return ''; } public function getName(): string|null { return $this->name; } public function getContent(): string|null { return $this->content; } public function toArray(): array { return $this->attributes; } public function __get(string $param) { return $this->attributes[$param] ?? null; } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.51 |
proxy
|
phpinfo
|
Settings