PHP code example of goutte / tree-bundle

1. Go to this page and download the library: Download goutte/tree-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

goutte / tree-bundle example snippets

 php
    use Goutte\TreeBundle\Model\Node as AbstractNode;
    class MyNode extends AbstractNode {
        // ...
    }
 php
    use Goutte\TreeBundle\Is\Node as NodeInterface;
    class MyNode implements NodeInterface {
        // ...
    }
 php
    use Goutte\TreeBundle\Is\Driver;
    use Goutte\TreeBundle\Factory\NodeFactoryInterface;

    class MyDriver implements Driver
    {
        protected $factory

        public function __construct(NodeFactoryInterface $factory)
        {
            $this->factory = $factory;
        }

        // ... implement Driver
    }
 xml
    <tag name="goutte_tree.driver" default="true" />