Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Provide a URL/ServerUrl extension, and extension loading #7

Merged

Commits on Feb 2, 2016

  1. Provide a URL/ServerUrl extension, and extension loading

    This patch was prompted by a desire to have `url` and `serverurl` functions that
    proxy to the zend-expressive-helpers classes. In order to do that, however, I
    ended up needing the following as well:
    
    - The ability to register the `League\Plates\Engine` as a service, and consume
      it when present.
    - A factory for `League\Plates\Engine` that can load extensions into the engine
      (via instance, service name, or class name), as well as load the custom URL
      extension by default.
    - The UrlExtension itself, which composes UrlHelper and ServerUrlHelper
      instances.
    - A factory for the UrlExtension that raises exceptions if either helper is
      missing.
    
    I updated the PlatesRendererFactory to delegate to the new PlatesEngineFactory
    if no `League\Plates\Engine` service is present in order to create the Plates
    engine instance. This also then ensures that by default, we have the
    `UrlExtension` loaded.
    weierophinney committed Feb 2, 2016
    Configuration menu
    Copy the full SHA
    3c28bf2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e2a8e3 View commit details
    Browse the repository at this point in the history