src/Tolkien/BuildAsset.php
public function find_all_files($dir) 
	{
	  $root = scandir($dir); 
    foreach($root as $value) 
    { 
        if($value === '.' || $value === '..')
        {
        	continue;
        } 
        if(is_file("$dir/$value")) 
        {
        	$result[] = "$dir/$value";
        	$this->setAsset("$dir/$value");
        	continue;
        } 
        foreach($this->find_all_files("$dir/$value") as $value) 
        { 
            $result[] = $value; 
        } 
    } 
    return $result; 
	}
public function find_all_files($dir) 
	{
	  $root = scandir($dir); 
    foreach($root as $value) 
    { 
        if($value === '.' || $value === '..')
        {
        	continue;
        } 
        if(is_file("$dir/$value")) 
        {
        	$result[] = "$dir/$value";
        	$this->setAsset("$dir/$value");
        	continue;
        } 
        foreach($this->find_all_files("$dir/$value") as $value) 
        { 
            $result[] = $value; 
        } 
    } 
    return $result; 
	}
public function find_all_files ( $ dir ) { $ root = scandir ( $ dir ) ; foreach ( $ root as $ value ) { if ( $ value === '.' || $ value === '..' ) { continue ; } if ( is_file ( "$dir/$value" ) ) { $ result [ ] = "$dir/$value" ; $ this -> setAsset ( "$dir/$value" ) ; continue ; } foreach ( $ this -> find_all_files ( "$dir/$value" ) as $ value ) { $ result [ ] = $ value ; } } return $ result ; }
Find All file on asset dir and create array of Model\Asset

@param string $dir
@return recursive
Find All file on asset dir and create array of Model \ Asset