[Vtigercrm-developers] Vtiger Class Loader?

Hamono, Chris (DPC) Chris.Hamono at sa.gov.au
Mon Jul 13 23:42:14 GMT 2015


Interesting Joe I hadn't see that before. Too bad its patented a sure fire way of making sure no one ever uses it.

It is similar in some ways to the comefrom statement 
https://en.wikipedia.org/wiki/COMEFROM

Chris


-----Original Message-----
From: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] On Behalf Of Joe Bordes
Sent: Monday, 13 July 2015 5:42 PM
To: vtigercrm-developers at lists.vtigercrm.com
Subject: Re: [Vtigercrm-developers] Vtiger Class Loader?

You may be interested in aspect oriented programming. Search for it in Google, there is a lot of information and there are some very good libraries already implemented for PHP and Javascript.

HTH
Joe
TSolucio


El 13/07/15 a las 08:46, Hamono, Chris (DPC) escribió:
> I was thinking about this request because I'd like to be able to override built in (core) classes to extend their functionality.
>
> I know this is not your specific use case but I thought I'd make the 
> point vtiger extensively uses "new self()" within static functions
>
> This means even if you replaced the current loader with a new loader that created a custom class most of the time the parent class will be created and your code never called.
>
> More is the pity. I saw this as a possible way to shortcut the creation of custom classes where you want to slightly manipulate functionality rather than recreate it.
>
> Chris
>
>
> -----Original Message-----
> From: vtigercrm-developers-bounces at lists.vtigercrm.com 
> [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] On Behalf Of 
> Alan Lord
> Sent: Thursday, 18 June 2015 12:21 AM
> To: vtigercrm-developers at lists.vtigercrm.com
> Subject: [Vtigercrm-developers] Vtiger Class Loader?
>
> I might have a need to have an Autoloader within a custom module so my code can find a bunch of class files in an included library of php code.
>
> So for example my tree would like like
>
> /modules/LSCustomModule/{models,actions,resources,libraries} etc.
>
> In the model I would need to use code that is in an associated library (built to use any PSR-0 compliant autoloader) under my "libraries"
> directory.
>
> I don't think the in-built Vtiger_Loader is going to suffice is it because the paths will be all wrong...?
>
> Would I need to I register my own Autoloader as part of the initialisation of my model? Could I override the Vtiger_Loader?
>
> Suggestions welcome ;-)
>
> Thanks
>
> Al
>
>
> _______________________________________________
> http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/

_______________________________________________
http://www.vtiger.com/



More information about the vtigercrm-developers mailing list