PHP code example of eftec / autoloadone

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

    

eftec / autoloadone example snippets



// This code will generate the file autoload.php

use eftec\AutoLoadOne\AutoLoadOne;

define("_AUTOLOAD_SELFRUN",false); // we want to call it manually.


define("_AUTOLOAD_USER","autoloadone");
define("_AUTOLOAD_PASSWORD","autoloadone");
define("_AUTOLOAD_ENTER",true); // if you want to autoload (no user or password) then set to true


define("_AUTOLOAD_ONEDEBUG",true); // this line is optional. By default, the DEBUG is off. The debug mode is used for find errors.


// @noautoload


// @autorun


// @autorun first

$auto=new AutoLoadOne();
$auto->extension='.php'; // it's not 

/* @noautoload */
class Someclass {

}

    private $_arrautoloadCustom = array(
		'Magento\AdminNotification' => '/app/code/',
		'Magento\Notice' => '/app/code/Developer/',...


array(
    'Magento\\AdminNotification' => $baseDir . '/app/code/MagentoActions.php',
    'Magento\\Notice' => $baseDir . '/app/code/Developer/Notice.php',

define("_AUTOLOAD_COMPOSERJSON",true);
   
@
shell
php AutoLoadOne.php -generate

php folder/located/autoloadone.php -current

RewriteEngine On
RewriteBase /

<Files "AutoLoadOne.php">
Order Allow,Deny
Deny from all
</Files>