0

I found that, "Magento 2, At its core is PSR-4 compliant".

Then I got into this: https://www.php-fig.org/psr/psr-4/

and the table at the bottom:

FULLY QUALIFIED CLASS NAME -> \Acme\Log\Writer\File_Writer

So I see from the most of Magento2 Code cases, that it uses:

use Magento\Catalog\Helper\Data;

shouldn't it be like :

use \Magento\Catalog\Helper\Data;

when it points to a class ?

and then when it comes to Constructors in Magento2 I can clearly see that this kind of syntax is used:

    \Magento\Catalog\Helper\Data;

Is used

mb I'm missing some core fundamentals but I'm curious about it :D

1 Answer 1

3
1
  • 1
    Thx, this makes this topic clear for me. Nov 29, 2018 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.