Following this on Termux on my phone & can't get Composer to work.
So here's an autoloader for anyone who needs to do this without composer:
(Include this file into the minicli file.)
<?php/**
* Example project-specific auto-loading implementation.
*
* After registering this autoload function with SPL, the namespaces on the left of the loaders array will load classes found in the paths on the right.
*
* @param string $class The fully-qualified class name.
* @return void
*/spl_autoload_register(function($class){$loaders=['Minicli\\'=>'/lib/','App\\'=>'/app/'];foreach($loadersas$prefix=>$base_dir){$len=strlen($prefix);if(strncmp($prefix,$class,$len)!==0){continue;}$relative_class=substr($class,$len);$file=__DIR__.$base_dir.str_replace('\\','/',$relative_class).'.php';if(file_exists($file)){require$file;return;}}//end foreach});
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Following this on Termux on my phone & can't get Composer to work.
So here's an autoloader for anyone who needs to do this without composer:
(Include this file into the minicli file.)