Skip to content

Commit

Permalink
Refactoring base class to traits.
Browse files Browse the repository at this point in the history
Most of the code from the base class (class.base.php) has been removed.
Code is now loaded via 2 traits NotifierManager and ObserverManager
The reason for this change is to allow classes to use the Observer/Notifier system
without extending the base class.
Any class that wants to use notifiers need now only `use` the NotifierManager
and observer classes `use` the ObserverManager.

Note the camelize method has been left in the base class for now to preserver backward
compatibilty, but that will probably change going forward.

I've also taken the opportunity to consolidate the 2 psr4Autoload config files into one.
  • Loading branch information
zcwilt committed Jul 1, 2020
1 parent 28525ef commit 95345e0
Show file tree
Hide file tree
Showing 14 changed files with 581 additions and 671 deletions.
4 changes: 2 additions & 2 deletions admin/includes/application_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@
/**
* psr-4 autoloading
*/
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'class.base.php';
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'vendors/AuraAutoload/src/Loader.php';
$psr4Autoloader = new \Aura\Autoload\Loader;
$psr4Autoloader->register();
require('includes/psr4Autoload.php');
require(DIR_FS_CATALOG . 'includes/psr4Autoload.php');
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'class.base.php';

require 'includes/classes/AdminRequestSanitizer.php';
require 'includes/init_includes/init_file_db_names.php';
Expand Down
11 changes: 0 additions & 11 deletions admin/includes/psr4Autoload.php

This file was deleted.

Loading

0 comments on commit 95345e0

Please sign in to comment.