Not signed in (Sign In)
 
Sep 3rd 2008 edited
 
I added a setting for the authenticator class name, used to create an Authenticator object:

$this->Authenticator = $this->ObjectFactory->NewContextObject($this,
$this->Configuration['AUTHENTICATION_CLASS']);

So that you can extend authenticator to write your own authenticator.

However it might be better to have something like:

$Configuration['OBJECT_FACTORY_REFERENCE_AUTHENTICATOR'] = 'MyAuthenticator';

And use OBJECT_FACTORY_REFERENCE_* to set object factory references automatically after the object factory instance is created in the Context constructor. That would allow to extend anything, even instances created before the extensions are loaded.
 
Sep 5th 2008 edited
 
The object factory need to know where to find the class thought.

it could be in somewhere like library/Extensions/ or extensions/Vendors/.
 
Sep 5th 2008
 
You have to manually include the class file you want to replace for other objects... Also I think we already have a setting that does this in appg/settings.php:

// People Settings
$Configuration['AUTHENTICATION_MODULE'] = 'People/People.Class.Authenticator.php';
 
Sep 5th 2008
 
Yep, and I added Configuration['AUTHENTICATION_CLASS'] so that we can do "class MyAuthenticator extends Authenticator" so that we just have to rewrite the authenticate method.

Should I add $Configuration['USER_MANAGER_MODULE'] or $Configuration['HEAD_CONTROLLER_MODULE'] plus a settings for the class name if someone needs it?
 
Sep 5th 2008 edited
 
An other solution would be to have $Configuration['LIBRARY_INCLUDE_PATH'] = '%LIBRARY%;%EXTENSIONS%/myextension/library'; that the object factory would look into.
 
Sep 6th 2008 edited
 
Here is the patch:
http://dl.getdropbox.com/u/83967/Automatic-object-factory-references.diff

To force vanilla to use MyUserManager, defined in /Path/to/extensions/MyExtension/library/People/People.Class.MyUserManager.php :
// conf/settings.php
...
$Configuration['OBJECT_FACTORY_REFERENCE_USER_MANAGER'] = 'MyUserManager';
$Configuration['LIBRARY_INCLUDE_PATH'] = '%LIBRARY%;%EXTENSIONS%/MyExtension/libary/';
 
Sep 7th 2008
 
Can someone update the documentation. It should be used as a last resort since uninstalling the extension will not remove the reference.

Issue information

  • 83
  • Dinoboff

    Dinoboff

    Bug Tracker

  • Resolved
  • Low
  • Feature

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.