<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks Blazej <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Vtigers embedded “new self()” calls prevent a psr-4 compliant autoloader from working as the loader will not be called when instantiating the class<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Chris<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> vtigercrm-developers-bounces@lists.vtigercrm.com [mailto:vtigercrm-developers-bounces@lists.vtigercrm.com] <b>On Behalf Of </b>Blazej Pabiszczak<br><b>Sent:</b> Monday, 13 July 2015 6:42 PM<br><b>To:</b> vtigercrm-developers@lists.vtigercrm.com<br><b>Subject:</b> Re: [Vtigercrm-developers] Vtiger Class Loader?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><a href="http://www.php-fig.org/psr/psr-4/">http://www.php-fig.org/psr/psr-4/</a> <o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>---<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Z poważaniem / Regards<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'> <o:p></o:p></span></p></div><div><p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Błażej Pabiszczak</span></strong><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><em><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Chief Executive Officer</span></em><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>M: +48.884999123<br>E: <a href="mailto:b.pabiszczak@yetiforce.com" title="Mail do Błażej Pabiszczak">b.pabiszczak@yetiforce.com</a><o:p></o:p></span></p></div><div class=MsoNormal align=center style='text-align:center'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><hr size=2 width="100%" align=center></span></div><p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>We created an innovative open source project called YetiForceCRM. You can test it <a href="https://test.yetiforce.com">here</a>, <a href="https://github.com/YetiForceCompany/YetiForceCRM">download</a> it for free or read its <a href="https://yetiforce.com/en/documentation.html">documentation</a>. Follow us on <a href="https://twitter.com/YetiForceEN">Twitter</a> to get real-time info about new functionalities and articles.<o:p></o:p></span></p></div><p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'> <o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>W dniu 2015-07-13 10:11, Joe Bordes napisał(a):<o:p></o:p></span></p><blockquote style='border:none;border-left:solid #1010FF 1.5pt;padding:0cm 0cm 0cm 5.0pt;margin-left:0cm;margin-right:0cm'><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>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.<br><br>HTH<br>Joe<br>TSolucio<br><br><br>El 13/⁠07/⁠15 a las 08:46, Hamono, Chris (DPC) escribió: <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>I was thinking about this request because I'd like to be able to override built in (core) classes to extend their functionality.<br><br>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<br><br>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.<br><br>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.<br><br>Chris<br><br><br>-⁠-⁠-⁠-⁠-⁠Original Message-⁠-⁠-⁠-⁠-⁠<br>From: <a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com">vtigercrm-developers-bounces@lists.vtigercrm.com</a> [mailto:<a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com">vtigercrm-developers-bounces@lists.vtigercrm.com</a>] On Behalf Of Alan Lord<br>Sent: Thursday, 18 June 2015 12:21 AM<br>To: <a href="mailto:vtigercrm-developers@lists.vtigercrm.com">vtigercrm-developers@lists.vtigercrm.com</a><br>Subject: [Vtigercrm-⁠developers] Vtiger Class Loader?<br><br>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.<br><br>So for example my tree would like like<br><br>/⁠modules/⁠LSCustomModule/⁠{models,actions,resources,libraries} etc.<br><br>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"<br>directory.<br><br>I don't think the in-⁠built Vtiger_Loader is going to suffice is it because the paths will be all wrong...?<br><br>Would I need to I register my own Autoloader as part of the initialisation of my model? Could I override the Vtiger_Loader?<br><br>Suggestions welcome ;-⁠)<br><br>Thanks<br><br>Al<br><br><br>_______________________________________________<br><a href="http://www.vtiger.com/">http://www.vtiger.com/</a><br><br>_______________________________________________<br><a href="http://www.vtiger.com/">http://www.vtiger.com/</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><br>_______________________________________________<br><a href="http://www.vtiger.com/">http://www.vtiger.com/</a><o:p></o:p></span></p></div></blockquote></div></body></html>