Your project classes MUST be located in src folder and use Lucinda\Project\... namespaces in order to be autoloaded. Folder structure:
Folder contains classes binding HTTP Headers API and STDOUT MVC API in order to generate ETag/Last-Modified representation of response body for HTTP caching. Framework Skeleton API comes with following:
All classes inside:
Folder contains STDOUT MVC API, Console MVC API as well as STDERR MVC API controllers. Framework Skeleton API only comes with following:
All classes inside:
To learn more how to register and use controllers, check Tutorial!
Folder contains all classes encapsulating communication to SQL/NoSQL databases via Entity/DAO model without automated persistance (ORM = performance disaster). Framework Skeleton API only comes with following:
Framework Configurer API comes with a number of demo implementations of Web Security API prototypes for authentication and authorization that may be deployed here but developers can create their own, provided their class extends/implements required prototype:
XML Tag | Tag Attribute | Class Prototype |
<form> @ <security> | dao | Lucinda\WebSecurity\Authentication\DAO\UserAuthenticationDAO |
<oauth2> @ <security> | dao | Lucinda\WebSecurity\Authentication\OAuth2\VendorAuthenticationDAO |
<by_dao> @ <security> | page_dao | Lucinda\WebSecurity\Authorization\DAO\PageAuthorizationDAO |
<by_dao> @ <security> | user_dao | Lucinda\WebSecurity\Authorization\DAO\UserAuthorizationDAO |
All classes inside:
To learn more how to model classes here using Entity-DAO model without ORM, check Tutorial!
Folder contains all classes used by STDERR MVC API to report errors into a storage medium. Framework Skeleton API binds it with Logging API and comes with following:
All classes inside:
To learn more how to register or create error reporters, check Tutorial!
To learn more how to register, create and use loggers, check Tutorial!
STDOUT MVC API also allows you to manually integrate APIs or user code through event listeners in index.php file via addEventListener method. Framework Skeleton API comes with following (please keep in mind they are ran in the order they are set once respective lifecycle event is reached):
Logical schema:
Console MVC API also allows you to manually integrate APIs or user code through event listeners in index.php file via addEventListener method. Framework Skeleton API comes with following (please keep in mind they are ran in the order they are set once respective lifecycle event is reached):
Logical schema:
Folder contains classes binding Logging API and STDOUT MVC API / Console MVC API in order to write log messages to a storage medium. Framework Skeleton API comes with following:
All classes inside:
Folder contains classes using STDOUT MVC API to validate request (GET, POST) or path parameters. Framework Skeleton API comes with none (because their logic depends on project) but all projects will require it eventually.
All classes inside:
To learn more how to work with parameter validators, check Tutorial!
Folder contains classes used by STDOUT MVC API, Console MVC API as well as STDERR MVC API to resolve views based on response format. Framework Skeleton API comes with following:
All classes inside:
To learn more how to register or create view resolvers, check Tutorial!
While STDOUT MVC API or Console MVC API handle requests into responses, some information saved by a component (via setters) may need to be made available to subsequent components (via getters). This is done via Lucinda\STDOUT\Attributes or Lucinda\ConsoleSTDOUT\Attributes that need to be extended by frameworks or developers to handle more functionality.
Framework extends Lucinda\STDOUT\Attributes with Lucinda\Project\Attributes in order to collect information provided by its own event listeners, which adds following extra getters:
Method | Returns | Description | Setter |
getLogger | Lucinda\Logging\Logger NULL |
Gets class to log messages with | Lucinda\Project\EventListeners\Logging |
getUserId | string integer null |
Gets logged in user id | Lucinda\Project\EventListeners\Security |
getCsrfToken | string NULL |
Gets token to send as 'csrf' POST param when logging in by form | Lucinda\Project\EventListeners\Security |
getAccessToken | string NULL |
Gets token to be remembered and presented by client for stateless authentication as 'Authorization' header | Lucinda\Project\EventListeners\Security |
getHeaders | Lucinda\Headers\Wrapper NULL |
Gets class to use in reading request headers received and writing response headers | Lucinda\Project\EventListeners\HttpHeaders |
getOAuth2Driver | Lucinda\Framework\OAuth2\DriverDetector NULL |
Gets class to use in retrieving remote resource from connected OAuth2 driver | Lucinda\Project\EventListeners\Security |
As developers are creating their own event listeners, they need to modify this class (found in src folder) and add setters&getters for any information they want to put in transport layer.
Framework extends Lucinda\ConsoleSTDOUT\Attributes with Lucinda\Project\ConsoleAttributes in order to collect information provided by its own event listeners, which adds following extra getters:
Method | Returns | Description | Setter |
getLogger | Lucinda\Logging\Logger NULL |
Gets class to log messages with | Lucinda\Project\EventListeners\Console\Logging |
As developers are creating their own event listeners, they need to modify this class (found in src folder) and add setters&getters for any information they want to put in transport layer.
Lucinda\Project\EmergencyHandler is used to process any errors that happen while STDERR MVC API handles exceptions into response. It reads stderr.xml and produces a status 500 response using with debug information (if <display_errors> is on for current ENVIRONMENT)!
Please note that Framework Skeleton API only bundles html, json and console response format support. For other formats you may need to modify this class!