/** * the singleton pattern * * @return SoEventManager_Controller_SoEvent */ public static function getInstance() { if (self::$_instance === NULL) { self::$_instance = new self(); } return self::$_instance; }
/** * the constructor * * don't use the constructor. use the singleton */ private function __construct() { $this->_applicationName = 'Billing'; $this->_backend = new Billing_Backend_StockFlow(); $this->_modelName = 'Billing_Model_StockFlow'; $this->_articleSupplyController = Billing_Controller_ArticleSupply::getInstance(); $this->_currentAccount = Tinebase_Core::getUser(); $this->_purgeRecords = FALSE; $this->_doContainerACLChecks = FALSE; $this->_config = isset(Tinebase_Core::getConfig()->billing) ? Tinebase_Core::getConfig()->billing : new Zend_Config(array()); }
public function saveArticleSupply($recordData) { return $this->_save($recordData, Billing_Controller_ArticleSupply::getInstance(), 'ArticleSupply'); }