PHP code example of unrealmanu / abstract-walker

1. Go to this page and download the library: Download unrealmanu/abstract-walker 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/ */

    

unrealmanu / abstract-walker example snippets



    abstract function loadChildren(array $parent): array;

    /**
     * @param $parent
     * @return array
     */
    public function walk($parent): array;

    /**
     * @param $parent
     * @return Generator
     */
    public function walkGen($parent): Generator;

LoadChidren($parent)

walk($parent) [low performance - easy to use and check]

walkGen($parent) [best perfomance]

    public function setRecursiveProcessStatus(bool $status = true): bool;

    public function setFilterInstance(array $class): array;

    public function setRecursiveDepthLimit(int $recursiveDepthLimit): void;

    public function itemFilter($item): bool