简体   繁体   中英

Namespace in a PrestaShop module

I'm creating a prestashop module that must be validated here : https://validator.prestashop.com .

I'm using an LGPL library , based on namespaces . Unfortunately all the classes in the namespace file is not found by the validator. The error : Class ' Httpful \\ Handlers \\ JsonHandler ' does not exists.

There is a best practice to recognize the classes?

Unfortunately Prestashop still can't handle namespaces, one of ways how to fix it:

In the module main file mymodule.php

include 'actualcode.php'

in actualcode.php - the module real code, with namespaces etc.

It works in Prestashop installation, I'm not sure about validator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM