Module::className() method

Return this object’s class name

If your Module descends from Wire, or any of it's derivatives (as would usually be the case), then you don't need to implement this method as it's already present.

Usage

// basic usage
$string = $module->className();

// usage with all arguments
$string = $module->className($options = null);

Arguments

NameType(s)Description
options (optional)array, bool, null

Optionally an option or boolean for 'namespace' option:

  • lowercase (bool): Specify true to make it return hyphenated lowercase version of class name
  • namespace (bool): Specify false to omit namespace from returned class name. Default=true.
  • Note: when lowercase=true option is specified, the namespace=false option is required.

Return value

string

See Also


Module methods and properties

API reference based on ProcessWire core version 3.0.244

Latest news

  • ProcessWire Weekly #560
    In the 560th issue of ProcessWire Weekly we'll check out the latest core updates, cover newly released ProcessWire modules, and more. Read on!
    Weekly.pw / 1 February 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits