Normalize a class name with or without namespace, or get namespace of class
Default behavior is to return class name without namespace.
Usage
// basic usage
$string = wireClassName ($className);
// usage with all arguments
$string = wireClassName ($className, $withNamespace = false, bool $verbose = false);
Arguments
Name | Type(s) | Description |
---|---|---|
className | string, object | Class name or object instance |
withNamespace (optional) | bool, int, string | Should return value include namespace? (default=false)
|
verbose (optional) | bool | When namespace argument is true or 1, use verbose return value (added 3.0.143). This does the following:
|
Return value
string
null
Returns string or NULL if namespace-only requested and unable to determine
Functions methods and properties
API reference based on ProcessWire core version 3.0.236