[TYPO3-english] Autoloader doesn't work for BE-Modules
Kay Strobach
typo3 at kay-strobach.de
Mon Jul 11 15:27:18 CEST 2011
Hi,
the class needs to fit the TYPO3 CGL!
tx_extensionamewithoutunderscores_classname
For extbase compatibilitx the name can also be:
Tx_extensionamewithoutunderscores_className
The devtools respect the codingguidelines ;)
See [1] filenames and namespaces
Regards
Kay
[1]
http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/4.5.1/view/1/2/#id2313485
Am 11.07.2011 14:44, schrieb hinterindien at gmx.net:
> Hi Kay,
> the class is named for example "ysbe_unitmgr" and is located in the file "class.ysbe_unitmgr.php".
>
> And no, I didn't create ext_autoload with devtools, but ext_autoload basically just returns an array: "return (array('ysbe_unitmgr'=>$libPath.'class.ysbe_unitmgr.php'));" where libPath contains the correct path.
>
> But ext_autoload seems not to be passed at a normal run of the BE-script...
>
> Regards
> Nicolai
>
> -------- Original-Nachricht --------
>> Datum: Mon, 11 Jul 2011 13:35:56 +0200
>> Von: Kay Strobach <typo3 at kay-strobach.de>
>> An: typo3-english at lists.typo3.org
>> Betreff: Re: [TYPO3-english] Autoloader doesn\'t work for BE-Modules
>
>> Hi,
>>
>> how is your class named?
>> Have you created the autoload ext with the devtools?
>>
>> Regards
>> Kay
>>
>> Am 11.07.2011 12:52, schrieb hinterindien at gmx.net:
>>> Hi list!
>>>
>>> I couldn't get the autoloader running.
>>>
>>> I have an installation of typo3 4.5, an own BE-Extension with a file
>> ext_autoload.php in the main folder of the extension. The extension is running
>> and works. But if I replace the "require_once"-Statement inside my code by
>> the appropriate entry in ext_autoload.php, PHP throws a fatal error "Class
>> not found".
>>>
>>> Clearing caches didn't help.
>>>
>>> Do I have to activate the autoloader? Register my extension with the
>> autoloader? I didn't find any hints in the documentation...
>>>
>>> Thanks for any helpful ideas
>>>
>>> Nicolai
>>>
>>>
>>>
>>
>>
>> --
>> http://www.kay-strobach.de - Open Source Rocks
>>
>> TYPO3 .... inspiring people to share!
>> Get involved: http://typo3.org
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
--
http://www.kay-strobach.de - Open Source Rocks
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
More information about the TYPO3-english
mailing list