loadPackages() public static method

If you want some packages run in both Web and Console, register them here.
public static loadPackages ( ) : Windwalker\Core\Package\AbstractPackage[]
return Windwalker\Core\Package\AbstractPackage[]
Example #1
0
 /**
  * getPackages
  *
  * @return  array
  */
 public function getPackages()
 {
     /*
      * Get Global Packages
      * -----------------------------------------
      * If you want a package can be use in every applications (for example: Web and Console),
      * set it in Windwalker\Windwalker object.
      */
     $packages = Windwalker::loadPackages();
     /*
      * Get Packages for This Application
      * -----------------------------------------
      * If you want a package only use in this application or want to override a global package,
      * set it here. Example: $packages[] = new Flower\FlowerPackage;
      */
     // Your packages here...
     return $packages;
 }
Example #2
0
 /**
  * getPackages
  *
  * @return  array
  */
 public static function loadPackages()
 {
     /*
      * Get Global Packages
      * -----------------------------------------
      * If you want a package can be used in every applications (for example: Web and Console),
      * set it in Windwalker\Windwalker object.
      */
     $packages = array_merge(parent::loadPackages(), Windwalker::loadPackages());
     /*
      * Get Packages for This Application
      * -----------------------------------------
      * If you want a package only use in this application or want to override a global package,
      * set it here. Example: $packages[] = new Flower\FlowerPackage;
      */
     // Your packages here...
     $packages['_debugger'] = new DebuggerPackage();
     return $packages;
 }