// Refactoring of shop class with new context

This commit is contained in:
rMalie
2011-07-12 16:28:20 +00:00
parent e7ea230525
commit 2d77925e7d
28 changed files with 216 additions and 185 deletions
+54 -3
View File
@@ -24,21 +24,72 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* @since 1.5.0
*/
class ContextCore
{
/**
* @var Context
*/
protected static $instance;
/**
* @var Cart
*/
public $cart;
/**
* @var Customer
*/
public $customer;
/**
* @var Cookie
*/
public $cookie;
/**
* @var Link
*/
public $link;
/**
* @var Country
*/
public $country;
/**
* @var Employee
*/
public $employee;
/**
* @var Controller
*/
public $controller;
public $lang;
/**
* @var Language
*/
public $language;
/**
* @var Currency
*/
public $currency;
/**
* @var AdminTab
*/
public $tab;
/**
* @var Shop
*/
public $shop;
/**
* Create a context without singleton constraint
*/
@@ -48,7 +99,7 @@ class ContextCore
$link = null,
$country = null,
$employee = null,
$lang = null,
$language = null,
$currency = null,
$tab = null)
{
@@ -58,7 +109,7 @@ class ContextCore
$this->link = $link;
$this->country = $country;
$this->employee = $employee;
$this->lang = $lang;
$this->language = $language;
$this->currency = $currency;
$this->tab = $tab;
}