Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mvc - larger overhaul replacing Phalcon Application (#6389)
This removes most phalcon code currently being used on our end, except the Volt templates (which are re-wrapped) and a translation class we can easily replace later in a separate commit. Consumers of our controller classes shouldn't notice a difference as the used objects and methods are named the same. The most notable changes are the following ones: * Exceptions about not being able to find a requested path now break down into different exceptions inheriting from DispatchException, which makes it easier from the entrypoint (api.php, index.php) to catch and handle accordingly. * When not in development mode, raw exceptions are not being returned anymore, which increases security * The Dispatcher class is reponsible for object construction and mapping validation (valid uri, but no object found) * The Router class replaces previous Application class, it disects offered uri's into namespaces, classnames and methods to call. In the long run there should be a seperate controller for controllers using volt templates or api calls, but as the existing ones don't distinct between this and the output handling is different now, we can park this for a later moment in time (the performance penalty should be rather low). Some unused functionality has been removed, for example support for the X-HTTP-Method-Override header in Request->getMethod() (see https://github.com/phalcon/cphalcon/blob/44243c07658d060cd8a21761743b0f4fc01641aa/phalcon/Http/Request.zep#L599-L609).
- Loading branch information