• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Composer and WordPress Plugins

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.

Blog entry information

Author
LPH
Views
1,959
Last update

More entries in General

More entries from LPH

Top