Class AscmvcEvent
The clas AscmvcEvent extends the Zend\EventManager\Event class and adds logic that is specific to this MVC.
Class AscmvcEventManager
The AscmvcEventManager class extends the Zend\EventManager\EventManager class and adds events and logic that are specific to this MVC.
Class AscmvcEventManagerFactory
Returns an instance of the AscmvcEventManager without a shared manager.
Class Atlas
The Atlas class extends the AbstractModelObject and uses the atlas/orm library.
Class Controller
The Controller class extends the AbstractController and implements the AscmvcEventManagerListenerInterface.
Class ControllerManager
The ControllerManager class extends the AbstractControllerManager and acts as the MVC's dispatcher object.
Class Doctrine
The Doctrine class extends the AbstractModelObject and uses the doctrine/dbal and doctrine/orm libraries.
Class FastRouter
The FastRouter class extends the AbstractRouter class and uses the nikic/fast-route library.
An example of a general-purpose implementation that includes the optional functionality of allowing multiple base directories for a single namespace prefix.
Given a foo-bar package of classes in the file system at the following paths ...
/path/to/packages/foo-bar/
src/
Baz.php # Foo\Bar\Baz
Qux/
Quux.php # Foo\Bar\Qux\Quux
tests/
BazTest.php # Foo\Bar\BazTest
Qux/
QuuxTest.php # Foo\Bar\Qux\QuuxTest
... add the path to the class files for the \Foo\Bar\ namespace prefix as follows:
<?php
// instantiate the loader
$loader = new \Example\Psr4AutoloaderClass;
// register the autoloader
$loader->register();
// register the base directories for the namespace prefix
$loader->addNamespace('Foo\Bar', '/path/to/packages/foo-bar/src');
$loader->addNamespace('Foo\Bar', '/path/to/packages/foo-bar/tests');
The following line would cause the autoloader to attempt to load the \Foo\Bar\Qux\Quux class from /path/to/packages/foo-bar/src/Qux/Quux.php:
<?php
new \Foo\Bar\Qux\Quux;
The following line would cause the autoloader to attempt to load the \Foo\Bar\Qux\QuuxTest class from /path/to/packages/foo-bar/tests/Qux/QuuxTest.php:
<?php
new \Foo\Bar\Qux\QuuxTest;