Example #1
0
 /**
  * Initialize object of class
  *
  * @return \Magento\Downloader\Controller
  */
 public static function singleton()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
         if (self::$_instance->isDownloaded()) {
             if (!class_exists('Magento', false)) {
                 if (!file_exists(self::$_instance->getBootstrapPath())) {
                     return false;
                 }
                 include_once self::$_instance->getBootstrapPath();
                 \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\\Framework\\App\\State')->setIsDownloader();
             }
             if (self::isInstalled()) {
                 \Mage::getSingleton('Magento\\Backend\\Model\\UrlInterface')->turnOffSecretKey();
             }
         }
     }
     return self::$_instance;
 }
Example #2
0
 /**
  * Retrieve Controller as singleton
  *
  * @return \Magento\Downloader\Controller
  */
 public function controller()
 {
     return \Magento\Downloader\Controller::singleton();
 }
Example #3
0
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
if (version_compare(phpversion(), '5.4.0', '<') === true) {
    echo '<div style="font:12px/1.35em arial, helvetica, sans-serif;"><div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;"><h3 style="margin:0; font-size:1.7em; font-weight:normal; text-transform:none; text-align:left; color:#2f2f2f;">Whoops, it looks like you have an invalid PHP version.</h3></div><p>Magento supports PHP 5.4.0 or newer. <a href="http://www.magentocommerce.com/magento2/install" target="">Find out</a> how to install</a> Magento using PHP-CGI as a work-around.</p></div>';
    exit;
}
\Magento\Framework\Autoload\Simple::register();
require_once "lib/Magento/Framework/Autoload/Simple.php";
umask(0);
\Magento\Downloader\Controller::run();