PHP Classes
elePHPant
Icontem

File: src/index.php

Recommend this page to a friend!
  Classes of Istvan Dobrentei  >  PHP OpenCart CLI  >  src/index.php  >  Download  
File: src/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP OpenCart CLI
Control an OpenCart installation from the console
Author: By
Last change:
Date: 2 months ago
Size: 451 bytes
 

 

Contents

Class file image Download
<?php
spl_autoload_register
(function($className) {
   
$currentDir = dirname(__FILE__);
   
$namespace = str_replace("\\", "/", __NAMESPACE__);
   
$className = str_replace("\\", "/" ,$className);
   
$class = (empty($namespace) ? $currentDir . "/lib/" : $namespace . "/") . "{$className}.php";
    if(
file_exists($class))
    {
        include_once(
$class);
    }
});
$params = getopt(null, OpencartCli::getParams());
$cli = new OpencartCli($params);