mirror of
https://github.com/foomo/Foomo.Magento2.git
synced 2025-10-16 12:35:34 +00:00
simple bootstrap added
This commit is contained in:
parent
084843dd7c
commit
ee26bd5fe8
30
lib/Foomo/Magento2/Boostrap.php
Normal file
30
lib/Foomo/Magento2/Boostrap.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
*/
|
||||
|
||||
namespace Foomo\Magento2;
|
||||
use Magento\Framework\App\Bootstrap;
|
||||
|
||||
require \Foomo\Magento2\Module::getModuleConfig()->magentoRootFolder . '/app/bootstrap.php';
|
||||
|
||||
class Boostrap
|
||||
{
|
||||
private static $bootsrap;
|
||||
|
||||
private static $appState;
|
||||
|
||||
|
||||
/**
|
||||
* @return \Magento\Framework\App\Bootstrap
|
||||
*/
|
||||
public static function init() {
|
||||
if (is_null(self::$bootstrap)) {
|
||||
self::$bootstrap = Bootstrap::create(BP, $_SERVER);
|
||||
$obj = self::$bootstrap->getObjectManager();
|
||||
$state = $obj->get('Magento\Framework\App\State');
|
||||
$state->setAreaCode('frontend');
|
||||
}
|
||||
return self::$bootsrap;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user