[Vtigercrm-developers] Vtiger Class Loader?
Błażej Pabiszczak
b.pabiszczak at yetiforce.com
Mon Jul 13 09:11:44 GMT 2015
http://www.php-fig.org/psr/psr-4/ [2]
---
Z poważaniem / Regards
BŁAŻEJ PABISZCZAK
_Chief Executive Officer_
M: +48.884999123
E: b.pabiszczak at yetiforce.com
-------------------------
We created an innovative open source project called YetiForceCRM. You
can test it here [3], download [4] it for free or read its documentation
[5]. Follow us on Twitter [6] to get real-time info about new
functionalities and articles.
W dniu 2015-07-13 10:11, Joe Bordes napisał(a):
> 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/ [1]
>>
>> _______________________________________________
>> http://www.vtiger.com/ [1]
>
> _______________________________________________
> http://www.vtiger.com/ [1]
Links:
------
[1] http://www.vtiger.com/
[2] http://www.php-fig.org/psr/psr-4/
[3] https://test.yetiforce.com
[4] https://github.com/YetiForceCompany/YetiForceCRM
[5] https://yetiforce.com/en/documentation.html
[6] https://twitter.com/YetiForceEN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150713/cffd45b7/attachment-0001.html>
More information about the vtigercrm-developers
mailing list