1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Composer and WordPress Plugins

The newest XenWord version is being developed to use the Composer autoload feature.
  1. Composer.png

    PHP development eventually requires the programmer to understand and use Composer. XenWord 3 does not use the package dependency manager; however, the newest XenWord version is being developed to use the Composer autoload feature. The current working alpha relies on namespaces.

    At this point, the new XenWord version directory structure is complete.

    /plugins/xenword/xenword.php
    /plugins/xenword/assets
    /plugins/xenword/framework
    /plugins/xenword/src
    /plugins/xenword/support
    /plugins/xenword/vendor

    The assets subdirectory contains the CSS and images. The framework directory contains the Redux Framework. The src subdirectory holds the PHP files for XenWord. Support holds the text files loaded by the Redux Framework. The Vendor subdirectory holds the Composer files.

    The beauty of this structure is to help upgrade the Redux Framework quickly by simply replacing the files in the framework directory. Files which are rarely touched are now isolated.

    Most important, using autoload will remove almost a dozen loader files placed at the beginning of each XenWord system.

    At this point in the development of the plugin, Composer is loaded, the Redux Framework loads properly, and the xenword.php loads the Composer autoload and the framework.

    The first attempts to get the Connector class to load properly failed.

Comments

To make a comment simply sign up and become a member!