We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ee0913 commit bfdc73dCopy full SHA for bfdc73d
src/Ubiquity/attributes/items/BaseAttribute.php
@@ -27,6 +27,17 @@ public function getNamespace(): string {
27
return (new \ReflectionClass($this))->getNamespaceName();
28
}
29
30
+ protected function getDefaultParameters(): array {
31
+ $r = new \ReflectionMethod(get_class($this), '__construct');
32
+ $result = [];
33
+ foreach ($r->getParameters() as $param) {
34
+ if ($param->isOptional() && $param->isDefaultValueAvailable()) {
35
+ $result[$param->getName()] = $param->getDefaultValue();
36
+ }
37
38
+ return $result;
39
40
+
41
public function __toString(): string {
42
$fields = $this->getPropertiesAndValues();
43
$extsStr = UArray::asPhpAttribute($fields);
0 commit comments