wp-user-avatar
/
third-party
/
vendor
/
sabberworm
/
php-css-parser
/
src
/
ShortClassNameProvider.php
CSSList
6 days ago
Comment
6 days ago
Parsing
6 days ago
Position
6 days ago
Property
6 days ago
Rule
6 days ago
RuleSet
6 days ago
Value
6 days ago
CSSElement.php
2 months ago
OutputFormat.php
6 days ago
OutputFormatter.php
6 days ago
Parser.php
6 days ago
Renderable.php
6 days ago
Settings.php
6 days ago
ShortClassNameProvider.php
6 days ago
ShortClassNameProvider.php
21 lines
| 1 | <?php |
| 2 | |
| 3 | declare (strict_types=1); |
| 4 | namespace ProfilePressVendor\Sabberworm\CSS; |
| 5 | |
| 6 | /** |
| 7 | * Provides a method to obtain the short name of the instantiated class (i.e. without namespace prefix). |
| 8 | * |
| 9 | * @internal |
| 10 | */ |
| 11 | trait ShortClassNameProvider |
| 12 | { |
| 13 | /** |
| 14 | * @return non-empty-string |
| 15 | */ |
| 16 | private function getShortClassName(): string |
| 17 | { |
| 18 | return (new \ReflectionClass($this))->getShortName(); |
| 19 | } |
| 20 | } |
| 21 |