How to call a php file from a Symfony4 entity?

0

I would like to use this library in a symfony4 project: link

The fact is that I have used this library on other occasions, in small pure php projects, without any framework and including it was as simple as using this:

require 'libs/simplehtmldom/simple_html_dom.php'; 

The problem is that in Symfony4 I do not know which directory to include this folder or how to call it. I've already tried require , require_once , include , include_once ...

If someone could give me some guidance, I would appreciate it, I have been foolish for several days and I can not move forward.

Thank you very much.

    
asked by Florin Marian 06.03.2018 в 12:19
source

1 answer

0

I think you have two options for it.

The first is to use an external bundle, which uses that library. Navigating a bit on google, I found this:

link

The second, which I think is more interesting, is that symfony already provides a component for manipulating dom xml and html. It is the domCrawler component

link

Check the links that I've spent. They have a fairly clear explanation of its use.

    
answered by 06.03.2018 / 12:39
source