diff --git a/reference/classobj/functions/get-declared-traits.xml b/reference/classobj/functions/get-declared-traits.xml new file mode 100644 index 0000000000..028b89f15d --- /dev/null +++ b/reference/classobj/functions/get-declared-traits.xml @@ -0,0 +1,57 @@ + + + + + + get_declared_traits + Returns an array of all declared traits + + + + &reftitle.description; + + arrayget_declared_traits + + + + + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns an array with names of all declared traits in values. + Returns &null; in case of a failure. + + + + + + + diff --git a/reference/classobj/functions/trait-exists.xml b/reference/classobj/functions/trait-exists.xml new file mode 100644 index 0000000000..b28850b782 --- /dev/null +++ b/reference/classobj/functions/trait-exists.xml @@ -0,0 +1,74 @@ + + + + + + trait_exists + Checks if the trait exists + + + + &reftitle.description; + + booltrait_exists + stringtraitname + boolautoload + + + + + + + + + &reftitle.parameters; + + + traitname + + + Name of the trait to check + + + + + autoload + + + Whether to autoload if not already loaded. + + + + + + + + &reftitle.returnvalues; + + Returns &true; if trait exists, &false; if not, &null; in case of an error. + + + + + + +