当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage::headersSentThrowsException方法代码示例

本文整理汇总了PHP中Mage::headersSentThrowsException方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage::headersSentThrowsException方法的具体用法?PHP Mage::headersSentThrowsException怎么用?PHP Mage::headersSentThrowsException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage的用法示例。


在下文中一共展示了Mage::headersSentThrowsException方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 protected static function init($code)
 {
     Mage::$headersSentThrowsException = false;
     $options = array();
     $options['config_model'] = 'Codex_Xtest_Model_Core_Config';
     $options['cache_dir'] = Mage::getBaseDir('var') . DS . 'cache' . DS . 'xtest';
     Mage::reset();
     Mage::app($code, 'store', $options);
     if ($disableDouble = (bool) self::getArg('disable_double', false)) {
         self::getConfig()->setDisableDoubles($disableDouble);
     }
 }
开发者ID:nhp,项目名称:Xtest,代码行数:12,代码来源:Xtest.php

示例2:

if (!file_exists($mageFilename)) {
    echo 'Mage file not found';
    exit;
}
require $mageFilename;
if (!Mage::isInstalled()) {
    echo 'Application is not installed yet, please complete install wizard first.';
    exit;
}
if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}
#ini_set('display_errors', 1);
// emulate index.php entry point for correct URLs generation in API
Mage::register('custom_entry_point', true);
Mage::$headersSentThrowsException = false;
Mage::init('admin');
Mage::app()->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS);
Mage::app()->loadAreaPart(Mage_Core_Model_App_Area::AREA_ADMINHTML, Mage_Core_Model_App_Area::PART_EVENTS);
// query parameter "type" is set by .htaccess rewrite rule
$apiAlias = Mage::app()->getRequest()->getParam('type');
// check request could be processed by API2
if (in_array($apiAlias, Mage_Api2_Model_Server::getApiTypes())) {
    /** @var $server Mage_Api2_Model_Server */
    $server = Mage::getSingleton('api2/server');
    $server->run();
} else {
    /* @var $server Mage_Api_Model_Server */
    $server = Mage::getSingleton('api/server');
    $adapterCode = $server->getAdapterCodeByAlias($apiAlias);
    // if no adapters found in aliases - find it by default, by code
开发者ID:Vedariy,项目名称:test,代码行数:31,代码来源:api.php

示例3: _initTaxAndCurrency

 protected function _initTaxAndCurrency($paramsArray)
 {
     // Order tax percent
     // -------------------------------------
     $this->_taxPercent = $paramsArray['taxPercent'];
     // -------------------------------------
     // Order tax amount
     // -------------------------------------
     $this->_taxAmount = $paramsArray['taxAmount'];
     // -------------------------------------
     // Has tax on shipping
     // -------------------------------------
     $this->_taxIncludesShipping = (bool) (int) $paramsArray['taxIncludesShipping'];
     // -------------------------------------
     // Hack for cron
     // -------------------------------------
     $tempHeadersSentThrowsException = Mage::$headersSentThrowsException;
     Mage::$headersSentThrowsException = false;
     // -------------------------------------
     // Set store current currency
     // -------------------------------------
     $this->_quote->getStore()->setCurrentCurrencyCode($this->_orderCurrencyCode);
     // -------------------------------------
     // Hack for cron
     // -------------------------------------
     Mage::$headersSentThrowsException = $tempHeadersSentThrowsException;
     // -------------------------------------
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:28,代码来源:Order.php

示例4: initialize

 /**
  * Initialize an already installed Magento application
  */
 public function initialize()
 {
     Mage::setIsDeveloperMode($this->_isDeveloperMode);
     Mage_Core_Utility_Theme::registerDesignMock();
     Mage::$headersSentThrowsException = false;
     Mage::app('', 'store', $this->_options);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:10,代码来源:Bootstrap.php

示例5: initialize

 /**
  * Initialize an already installed Magento application
  */
 public function initialize()
 {
     $resource = Mage::registry('_singleton/Mage_Core_Model_Resource');
     $this->_resetApp();
     if ($resource) {
         Mage::register('_singleton/Mage_Core_Model_Resource', $resource);
     }
     Mage::setIsDeveloperMode($this->_developerMode);
     Mage::$headersSentThrowsException = false;
     Mage::app('', 'store', $this->_options);
 }
开发者ID:nemphys,项目名称:magento2,代码行数:14,代码来源:Bootstrap.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     Mage::$headersSentThrowsException = false;
 }
开发者ID:liip,项目名称:liip-magento-shared,代码行数:5,代码来源:Magento.php

示例7: _doDispatch

 protected function _doDispatch(Codex_Xtest_Model_Core_Controller_Request_Http $request, $postData = null)
 {
     Mage::app()->getStore()->setConfig('web/session/use_frontend_sid', true);
     if ($postData) {
         $request->setMethod(self::METHOD_POST);
         if (!isset($postData['form_key'])) {
             $postData['form_key'] = Mage::getSingleton('core/session')->getFormKey();
         }
         $request->setPost($postData);
     }
     Mage::$headersSentThrowsException = false;
     Mage::app()->setRequest($request);
     $dispatcher = new Codex_Xtest_Model_Core_Controller_Varien_Front();
     $dispatcher->setRouter(Mage::app()->getFrontController()->getRouters());
     $dispatcher->dispatch();
     foreach ($dispatcher->getResponse()->getHeaders() as $header) {
         if ($header['value'] == '404 Not Found') {
             Mage::throwException('404');
         }
     }
 }
开发者ID:nhp,项目名称:Xtest,代码行数:21,代码来源:Abstract.php


注:本文中的Mage::headersSentThrowsException方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。