-
Notifications
You must be signed in to change notification settings - Fork 1
Interface CookBook
Gerd Christian Kunze edited this page May 28, 2013
·
18 revisions
Common
MOC\Generic\Common\Instance.php
MOC\Generic\Common\Depending.php
MOC\Generic\Common\Changelog.php
MOC\Generic\Common.php
Device
MOC\Generic\Device\Core.php
MOC\Generic\Device\Extension.php
MOC\Generic\Device\Module.php
MOC\Generic\Device\Plugin.php
MOC\Generic\Device\Adapter.php
Every top-level class is considered a 'device' and therefore has to be derived from the corresponding generic device class
Every top-level file has to match the resulting filesystem location
Every sub-level file has to fit in the resulting top-level directory location
Filesystem:
- MOC\[DeviceTypeName]\[TopLevelClassName].php
- MOC\[DeviceTypeName]\[TopLevelClassName]\[SubLevelClassName].php
- ...
Namespace:
- Top-level Class: MOC\[DeviceTypeName]
- Sub-level Class: MOC\[DeviceTypeName]\[TopLevelClassName]
- ...
Classname:
- [(Top|Sub|...)LevelClassName]
namespace MOC\Plugin;
use MOC\Generic\Device\Plugin;
class PluginClassName implements Plugin {}
Resulting location: MOC\Plugin\PluginClassName.php
namespace MOC\Plugin\PluginClassName;
use MOC\Generic\Common;
class SubPluginClassName implements Common {}
Resulting location: MOC\Plugin\PluginClassName\SubPluginClassName.php