$ wp mwp add-class <slug> <classname>
This command adds a correctly namespaced class to your plugin in the
<slug>(required) The slug (directory) of the plugin to add to
<classname>(required) The name of the new class (namespaced relative to the plugin)
--type=<type>(optional) The type of class to scaffold. (‘generic’, ‘model’, ‘singleton’, ‘controller’)
When specifying a class using the
--type parameter, the following values are allowed:
generic: This generates a bare bones utility class. This is the default if no type is specified.
model: This generates a new class which extends the
ActiveRecordclass to be used for a model.
singleton: This generates a new class which extends the
Singletonclass to be used for a singleton.
controller: This generates a new controller class which extends the
$ wp mwp add-class acmecompany-gizmo Utility\Helper
Creating new plugin class file...
Class added successfully.