Exemple #1
0
 /**
  * Test properties.
  */
 public function testProperties()
 {
     $obj = new ZMObject();
     $obj->set('foo', 'bar');
     $obj->set('deng', 'poh');
     // custom only
     $this->assertEquals(array('foo' => 'bar', 'deng' => 'poh'), $obj->getProperties());
 }
 /**
  * Create new instance.
  */
 public function __construct($id = 0, $name = null)
 {
     parent::__construct();
     $this->setId($id);
     $this->name = $name;
     $this->sortOrder = 0;
 }
 /**
  * Create new shipping method.
  *
  * @param ZMShippingProvider provider The shipping provider for this method.
  * @param array zenMethod The zen-cart method infos.
  */
 public function __construct($provider, $zenMethod)
 {
     parent::__construct();
     $this->provider = $provider;
     $this->zenMethod = $zenMethod;
     $this->taxRate = Beans::getBean('ZenMagick\\StoreBundle\\Entity\\TaxRate');
 }
 /**
  * Create a new instance.
  *
  * @param ZMSearchCriteria criteria The search criteria; default is <code>null</code>.
  */
 public function __construct($criteria = null)
 {
     parent::__construct();
     $this->criteria = $criteria;
     $this->results = null;
     $this->totalNumberOfResults = null;
 }
 /**
  * Create a new payment type.
  *
  * @param object module The payment module; default is <code>null</code>.
  */
 public function __construct($module = null)
 {
     parent::__construct();
     $this->setModule($module);
     $this->fields = null;
     $this->prepared = false;
 }
 /**
  * Create a new instance.
  */
 public function __construct(array $config = array())
 {
     parent::__construct();
     $defaults = array('strictErrorChecking' => false, 'useIncludePath' => false, 'urlContext' => false);
     $this->config = array_merge($defaults, $config);
     $this->cache = null;
 }
Exemple #7
0
 /**
  * Create new instance.
  */
 public function __construct()
 {
     parent::__construct();
     $this->id = 0;
     $this->name = null;
     $this->extension = null;
 }
 /**
  * Create new instance.
  */
 public function __construct()
 {
     parent::__construct();
     $this->collectionId = 0;
     $this->name = '';
     $this->items = array();
 }
Exemple #9
0
 /**
  * Create new validation rule.
  *
  * @param string name The field name; default is <code>null</code>.
  * @param string defaultMsg The default error message; default is <code>null</code>.
  * @param string msg Optional custom error message; default is <code>null</code>.
  */
 public function __construct($name = null, $defaultMsg = null, $msg = null)
 {
     parent::__construct();
     $this->setName($name);
     $this->setDefaultMsg($defaultMsg);
     $this->setMsg($msg);
 }
Exemple #10
0
 /**
  * Create new instance.
  */
 public function __construct()
 {
     parent::__construct();
     $this->categories = array();
     $this->rootCategories = array();
     $this->productTypeIdMap = null;
 }
 /**
  * Create a new instance.
  *
  * @param ZMSearchCriteria criteria Optional search criteria; default is <code>null</code>.
  */
 public function __construct($criteria = null)
 {
     parent::__construct();
     $this->criteria = $criteria;
     $this->sortId = null;
     $this->descending = false;
 }
 /**
  * Create a new filter option.
  *
  * @param string name The option name; default is <code>null</code>.
  * @param int id The option id; default is <code>null</code>.
  * @param boolean active Optional active flag if this option is currently active; default is <code>false</code>.
  */
 public function __construct($name = null, $id = null, $active = false)
 {
     parent::__construct();
     $this->name = $name;
     $this->id = $id;
     $this->active = $active;
 }
Exemple #13
0
 /**
  * Create new image info.
  *
  * @param string image The default image name; default is <code>null</code>.
  * @param string alt The alt text; default is an empty string.
  */
 public function __construct($image = null, $alt = '')
 {
     parent::__construct();
     $this->altText = $alt;
     $this->parameter = array();
     $this->setDefaultImage($image);
 }
Exemple #14
0
 /**
  * Create new instance.
  */
 public function __construct()
 {
     parent::__construct();
     $this->name = null;
     $this->email = null;
     $this->amount = 0;
     $this->message = null;
 }
Exemple #15
0
 /**
  * Create new instance.
  */
 public function __construct()
 {
     parent::__construct();
     $this->id = null;
     $this->config = array();
     $this->basePath = null;
     $this->locales = array();
 }
 /**
  * Create new instance.
  *
  * @param string defaultPluginClass The default plugin class name.
  * @param array pluginDirs List of plugin base directories.
  * @param PluginOptionsLoader pluginOptionsLoader The plugin options loader.
  * @param Cache cache Cache to be used.
  */
 public function __construct($defaultPluginClass, array $pluginDirs, PluginOptionsLoader $pluginOptionsLoader, Cache $cache)
 {
     parent::__construct();
     $this->defaultPluginClass = $defaultPluginClass;
     $this->pluginDirs = $pluginDirs;
     $this->pluginOptionsLoader = $pluginOptionsLoader;
     $this->cache = $cache;
 }
Exemple #17
0
 /**
  * Create new instance.
  */
 public function __construct()
 {
     parent::__construct();
     $this->recordCompanyId = 0;
     $this->name = '';
     $this->image = null;
     $this->url = null;
 }
Exemple #18
0
 /**
  * Create new zone.
  */
 public function __construct()
 {
     parent::__construct();
     $this->setId(0);
     $this->countryId = 0;
     $this->code = '';
     $this->name = '';
 }
 /**
  * Create new instance.
  */
 public function __construct()
 {
     parent::__construct();
     $this->title = '';
     $this->amount = 0;
     $this->value = 0;
     $this->taxClassId = 0;
 }
 /**
  * Create new instance.
  */
 public function __construct()
 {
     parent::__construct();
     $this->resources = array('css' => array(), 'js' => array());
     $this->resourcesAsTemplates = false;
     $this->view = null;
     $this->virtualPathMap = array();
 }
 /**
  * Create new patch.
  *
  * @param string id Id of the patch.
  */
 public function __construct($id)
 {
     parent::__construct();
     $this->container = \ZenMagick\Base\Runtime::getContainer();
     $this->id = $id;
     $this->label = $id . ' Patch';
     $this->messages = array();
 }
Exemple #22
0
 /**
  * Create new config group.
  */
 public function __construct()
 {
     parent::__construct();
     $this->name = null;
     $this->description = null;
     $this->sortOrder = 0;
     $this->visible = true;
 }
Exemple #23
0
 /**
  * Create new instance.
  */
 public function __construct($pluginStatusMapBuilder, $contextConfigLoader)
 {
     parent::__construct();
     $this->pluginStatusMapBuilder = $pluginStatusMapBuilder;
     $this->contextConfigLoader = $contextConfigLoader;
     $this->plugins = array();
     $this->statusMap = null;
 }
 /**
  * Create new instance.
  *
  * @param array categoryInfo List of category info for categories to iterate.
  * @param int languageId The language id.
  * @param boolean fullFeed Optional flag to enable/disable full feed details; default is <code>true</code>.
  */
 public function __construct(array $categoryInfo, $languageId, $fullFeed = true)
 {
     parent::__construct();
     $this->categoryInfo = $categoryInfo;
     $this->languageId = $languageId;
     $this->index = 0;
     $this->fullFeed = $fullFeed;
 }
Exemple #25
0
 /**
  * Create new instance.
  */
 public function __construct()
 {
     parent::__construct();
     $mappings = array('media_clips' => array('mediaItemId' => array('column' => 'clip_id', 'type' => 'integer', 'key' => true, 'auto' => true), 'mediaId' => array('column' => 'media_id', 'type' => 'integer'), 'mediaTypeId' => array('column' => 'clip_type', 'type' => 'integer'), 'filename' => array('column' => 'clip_filename', 'type' => 'string'), 'dateAdded' => array('column' => 'date_added', 'type' => 'datetime'), 'lastModified' => array('column' => 'last_modified', 'type' => 'datetime')), 'media_manager' => array('collectionId' => array('column' => 'media_id', 'type' => 'integer', 'key' => true, 'auto' => true), 'name' => array('column' => 'media_name', 'type' => 'string'), 'lastModified' => array('column' => 'last_modified', 'type' => 'datetime'), 'dateAdded' => array('column' => 'date_added', 'type' => 'datetime')), 'media_to_products' => array('mediaId' => array('column' => 'media_id', 'type' => 'integer'), 'productId' => array('column' => 'product_id', 'type' => 'integer')), 'media_types' => array('mediaTypeId' => array('column' => 'type_id', 'type' => 'integer', 'key' => true, 'auto' => true), 'name' => array('column' => 'type_name', 'type' => 'string'), 'extentsion' => array('column' => 'type_ext', 'type' => 'string')), 'music_genre' => array('genreId' => array('column' => 'music_genre_id', 'type' => 'integer', 'key' => true, 'auto' => true), 'name' => array('column' => 'music_genre_name', 'type' => 'string'), 'dateAdded' => array('column' => 'date_added', 'type' => 'datetime'), 'lastModified' => array('column' => 'last_modified', 'type' => 'datetime')), 'product_music_extra' => array('productId' => array('column' => 'products_id', 'type' => 'integer', 'key' => true), 'artistId' => array('column' => 'artists_id', 'type' => 'integer'), 'recordCompanyId' => array('column' => 'record_company_id', 'type' => 'integer'), 'genreId' => array('column' => 'music_genre_id', 'type' => 'integer')), 'record_artists' => array('artistId' => array('column' => 'artists_id', 'type' => 'integer', 'key' => true, 'auto' => true), 'name' => array('column' => 'artists_name', 'type' => 'string'), 'image' => array('column' => 'artists_image', 'type' => 'string'), 'dateAdded' => array('column' => 'date_added', 'type' => 'datetime'), 'lastModified' => array('column' => 'last_modified', 'type' => 'datetime')), 'record_artists_info' => array('artistId' => array('column' => 'artists_id', 'type' => 'integer', 'key' => true), 'languageId' => array('column' => 'languages_id', 'type' => 'integer', 'key' => true), 'url' => array('column' => 'artists_url', 'type' => 'string'), 'urlClicked' => array('column' => 'url_clicked', 'type' => 'integer'), 'dateLastClick' => array('column' => 'date_last_click', 'type' => 'datetime')), 'record_company' => array('recordCompanyId' => array('column' => 'record_company_id', 'type' => 'integer', 'key' => true, 'auto' => true), 'name' => array('column' => 'record_company_name', 'type' => 'string'), 'image' => array('column' => 'record_company_image', 'type' => 'string'), 'dateAdded' => array('column' => 'date_added', 'type' => 'datetime'), 'lastModified' => array('column' => 'last_modified', 'type' => 'datetime')), 'record_company_info' => array('recordCompanyId' => array('column' => 'record_company_id', 'type' => 'integer', 'key' => true), 'languageId' => array('column' => 'languages_id', 'type' => 'integer', 'key' => true), 'url' => array('column' => 'record_company_url', 'type' => 'string'), 'urlClicked' => array('column' => 'url_clicked', 'type' => 'integer'), 'dateLastClick' => array('column' => 'date_last_click', 'type' => 'datetime')));
     foreach ($mappings as $table => $mapping) {
         \ZMRuntime::getDatabase()->getMapper()->setMappingForTable($table, $mapping);
     }
 }
Exemple #26
0
 /**
  * Create a new sort option.
  *
  * @param string name The option name.
  * @param int id The option id.
  * @param boolean active Optional active flag if this option is currently active.
  * @param boolean decending Ascending/decending flag (default is ascending.
  */
 public function __construct($name, $id, $active = false, $decending = false)
 {
     parent::__construct();
     $this->name = $name;
     $this->id = $id;
     $this->active = $active;
     $this->decending = $decending;
 }
 /**
  * Create new instance
  *
  * @todo: languageId default???
  */
 public function __construct($coupon, $name = '', $description = '', $languageId = 1)
 {
     parent::__construct();
     $this->coupon = $coupon;
     $this->setLanguageId($languageId);
     $this->setName($name);
     $this->setDescription($description);
 }
 /**
  * Create a new result list filter.
  *
  * @param string id Optional filter id.
  * @param string name Optional filter name.
  * @param string value Optional filter value.
  */
 public function __construct($id = null, $name = '', $value = '')
 {
     parent::__construct();
     $this->id = $id;
     $this->name = $name;
     $this->value = $value;
     $this->filterValues = explode(",", $value);
 }
Exemple #29
0
 /**
  * Create new instance.
  *
  * @param string name The contact name.
  * @param string email The contacts email address.
  * @param string message An optional message.
  */
 public function __construct($name = null, $email = null, $message = null)
 {
     parent::__construct();
     $this->name = $name;
     $this->email = $email;
     $this->recipient = null;
     $this->message = $message;
 }
 /**
  * Create new shopping cart item
  *
  * @param ShoppingCart shoppingCart The cart this item belongs to.
  * @todo store upload id in attribute value id
  */
 public function __construct(ShoppingCart $shoppingCart = null)
 {
     parent::__construct();
     $this->shoppingCart = $shoppingCart;
     $this->id = null;
     $this->quantity = 0;
     $this->itemPrice = 0;
     $this->oneTimeCharge = 0;
 }