// Normalize some classes

This commit is contained in:
rMalie
2012-01-23 15:25:43 +00:00
parent 768cf756c8
commit 59e5dfe9bf
19 changed files with 414 additions and 334 deletions
+33 -33
View File
@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -28,55 +28,55 @@
class StoreCore extends ObjectModel
{
/** @var integer Country id */
public $id_country;
public $id_country;
/** @var integer State id */
public $id_state;
public $id_state;
/** @var string Store name */
public $name;
public $name;
/** @var string Address first line */
public $address1;
public $address1;
/** @var string Address second line (optional) */
public $address2;
public $address2;
/** @var string Postal code */
public $postcode;
public $postcode;
/** @var string City */
public $city;
public $city;
/** @var float Latitude */
public $latitude;
public $latitude;
/** @var float Longitude */
public $longitude;
public $longitude;
/** @var string Store hours (PHP serialized) */
public $hours;
public $hours;
/** @var string Phone number */
public $phone;
public $phone;
/** @var string Fax number */
public $fax;
public $fax;
/** @var string Note */
public $note;
public $note;
/** @var string e-mail */
public $email;
public $email;
/** @var string Object creation date */
public $date_add;
public $date_add;
/** @var string Object last modification date */
public $date_upd;
public $date_upd;
/** @var boolean Store status */
public $active = true;
public $active = true;
/**
* @see ObjectModel::$definition
@@ -113,18 +113,18 @@ class StoreCore extends ObjectModel
),
);
public function __construct($id_store = NULL, $id_lang = NULL)
public function __construct($id_store = null, $id_lang = null)
{
parent::__construct($id_store, $id_lang);
$this->id_image = ($this->id AND file_exists(_PS_STORE_IMG_DIR_.(int)$this->id.'.jpg')) ? (int)$this->id : false;
$this->id_image = ($this->id && file_exists(_PS_STORE_IMG_DIR_.(int)$this->id.'.jpg')) ? (int)$this->id : false;
$this->image_dir = _PS_STORE_IMG_DIR_;
}
public function getWsHours()
{
return implode(';', unserialize($this->hours));
}
public function setWsHours($hours)
{
$this->hours = serialize(explode(';', $hours));