Returns various information on the methods of an object, in different formats.
public static methods ( mixed $class, string $format = null, array $options = [] ) : mixed | ||
$class | mixed | A string class name or an object instance, from which to get methods. |
$format | string | The type and format of data to return. Available options are: - `null`: Returns a `Collection` object containing a `ReflectionMethod` instance for each method. - `'extents'`: Returns a two-dimensional array with method names as keys, and an array with starting and ending line numbers as values. - `'ranges'`: Returns a two-dimensional array where each key is a method name, and each value is an array of line numbers which are contained in the method. |
$options | array | Set of options applied directly (check `_items()` for more options): - `'methods'` _array_: An arbitrary list of methods to search, as a string (single method name) or array of method names. - `'group'`: If true (default) the array is grouped by context (ex.: method name), if false the results are sequentially appended to an array. -'self': If true (default), only returns properties defined in `$class`, excluding properties from inherited classes. |
return | mixed | Return value depends on the $format given: - `null` on failure. - `lithium\util\Collection` if $format is `null` - `array` if $format is either `'extends'` or `'ranges'`. |