[[Controller]]
|
|
———
|
Table of Contents
ControllerBuilt in controllerBuilt in controller includes following classes
Initializing the controller$controller = new PageControllerUrl(__DIR__.'/action'); $controller->setErrorReporter($errorReporter); $content = $controller->runActions(); URL to class mappingEach url maps to corresponding class where directories are namespaces and files are classes. For example url /users/add.html maps to class add in namespace \action\users (assuming that root directory for action classes is named action). Directory url like '/users/' is the same as '/users/index.html'. NamespacesAction directory is the PSR-4 base for actions. i.e. if actions directory is 'action/', the /users/add.html action will go to 'action/users/' directory, the file will be 'add.php', the name space is 'action\users' and the class name is add:
|