Implemented constructor, destructor, setTable() and insertModel() in AOOSStorageDevic...
[AOOS.git] / AOOSModule.php
bloba97f7bd20474f0a440b33c3b3a6416132b34df39
1 <?php
3 /**
4 * AOOSModule
6 * Base module for all modules
8 * @author Sebastian Skejø
9 */
12 class AOOSModule
14 protected $_core = null;
16 /**
17 * Default constructor. Redefined constructors must take $core as first argument and call $this->_init($core)
18 * @param AOOSCore $core A reference to the core object
20 public function __construct(&$core)
22 $this->_init($core);
25 /**
26 * Must be called when redefining constructor. Takes core object as first argument.
27 * @param AOOSCore $core A reference to the core object
29 protected function _init($core)
31 if (!$core instanceof AOOSCore || !isset($core))
33 return false;
36 $this->_core = $core;
39 /**
40 * Translates a given string to language selected in settings
41 * @param string $stringID The unique ID of the string to translate
43 public function tr($stringID)
45 return $stringID;