ReflectionFunctionAbstract::getAttributes Pobiera atrybuty &reftitle.description; public arrayReflectionFunctionAbstract::getAttributes stringnullname&null; intflags0 Zwraca wszystkie atrybuty zdefiniowane dla obecnej funkcji lub metody jako tablicę obiektów ReflectionAttribute. &reftitle.parameters; &reflection.getattributes.param.name; &reflection.getattributes.param.flags; &reftitle.returnvalues; Tablica obiektów ReflectionAttribute. &reftitle.examples; Podstawowe użycie z metodą klasy getAttributes(); print_r(array_map(fn($attribute) => $attribute->getName(), $attributes)); ?> ]]> &example.outputs; Owoc [1] => Czerwony ) ]]> Podstawowe użycie z funkcją getAttributes(); print_r(array_map(fn($attribute) => $attribute->getName(), $attributes)); ?> ]]> &example.outputs; Owoc [1] => Czerwony ) ]]> Filtrowanie wyników po nazwie klasy getAttributes('Owoc'); print_r(array_map(fn($attribute) => $attribute->getName(), $attributes)); ?> ]]> &example.outputs; Owoc ) ]]> Filtrowanie wyników po nazwie klasy, z uwzględnieniem dziedziczenia getAttributes('Kolor', ReflectionAttribute::IS_INSTANCEOF); print_r(array_map(fn($attribute) => $attribute->getName(), $attributes)); ?> ]]> &example.outputs; Czerwony ) ]]> &reftitle.seealso; ReflectionClass::getAttributes ReflectionClassConstant::getAttributes ReflectionParameter::getAttributes ReflectionProperty::getAttributes