Git Product home page Git Product logo

ez-extensionloader's Introduction

License: See, LICENSE
Installation: See, INSTALL

YMCExtensionLoader introduces a new order how to load ini-settings in eZ
publish. This has been a long time demand as you might see here:
http://issues.ez.no/IssueView.php?Id=2709

Besides a more consistent load-hierarchy YMCExtensionLoader adds support to
global override settings for a specific siteaccess which is useful
for local development.
Note that YMCExtensionLoader does not care much whether an extension is loaded
as "ActiveExtension" or "ActiveAccessExtension". The only thing is,
that an "ActiveExtension" is _tried_ to be loaded before an
"ActiveAccessExtension". It is recommended that you only use the
setting "ActiveExtension" to load an extension as long as you don't
experience problems with that.

Additionally YMCExtensionLoader allows loading of extensions inside any other
extension (so there is in fact no more need to use the
"ActiveAccessExtension"-setting which most likely has been
introduced in eZ publish to workaround this missing feature).

An other feature is, that PHP-autoloads using eZ components autoload
system are automatically supported, by simply putting a file 'autoload.php'
in an extensions subfolder 'autoload'. For this extension this is e.g.:
'extension/ymcextensionloader/autoload/autoload.php'
With this feature it is possible to define autoloads by extension, which is
much easier to handle than having a single autoload-file for all extensions.

----------------------------------------
Here is an example how the loader works:
----------------------------------------
Assume there are four extensions called "FIRST", "SECOND", "THIRD", and
"FOURTH". The extension "FIRST" is activated in "settings/site.ini" (or
in "settings/override/site.ini" if you e.g. just want to try out a new
extension), whether as "ActiveExtension" or "ActiveAccessExtension"
(which doesn't matter much, see above).  Inside the extension "FIRST"
(which now is active), the extension "SECOND" is activated in
"extension/FIRST/settings/site.ini" (again: it doesn't matter whether
as "ActiveExtension" or as "ActiveAccessExtension" - I won't repeat
this fact anymore!). This will make YMCExtensionLoader load the extension
"SECOND" now.
Now we assume that the extension "SECOND" has the extension "THIRD"
referenced in its "extension/SECOND/settings/site.ini" which makes
eZ Publish to load "THIRD" now. I assume you got it now and can imagine
what will happen if "FOURTH" is referenced in "THIRD"...
----------------------------------------

This is the hierarchy used to load settings in YMCExtensionLoader - note that
higher numbers are searched for settings first (first look/load in 8.
then in 7. then in ... 1.):
1. Default Settings (/settings)
2. In ActiveExtensions (extension/EXTENSION/settings)
3. In ActiveAccessExtensions (/extension/EXTENSION/settings)
4. Default Siteaccess-Settings (/settings/siteaccess)
5. Siteaccess in ActiveExtensions
                 (/extension/EXTENSION/settings/siteaccess/SITEACCESS)
6. Siteaccess in ActiveAccessExtensions
                 (/extension/EXTENSION/settings/siteaccess/SITEACCESS)
7. Global overrides (/settings/override)
8. Global siteaccess overrides (/settings/override/sitaccess/SITEACCESS)

Note that it is even possible to load an additional extension in the
siteaccess-settings of an already activated extension.
----------- Here is an example: ------------------
It's possible to activate the extension "FIFTH" for the siteaccess
"SITEACCESS" which has a site.ini in the already active extension
"FOURTH" (so we talking about this site.ini:
"extension/FOURTH/settings/siteacces/SITEACCESS/site.ini"). If you now
access "SITEACCESS", the extension "FOURTH" will be active. And if
"FOURTH" activates the extension "SIX", this one will be active, too.
-------------------------------------------------------------

ez-extensionloader's People

Contributors

pascalvb avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.