public static function getInstance($aConnection = array(), $sTableName = null) { if (!isset(self::$instance)) { self::$instance = new self($aConnection, $sTableName); } return self::$instance; }
/** * Alle zertifizierten Benutzernamen auslesen * * @return array */ public function _getAllApplicationUsers($aArgs) { $aUsers = array(); if (class_exists('Immocaster_Data_Mysql')) { $aUsers = Immocaster_Data_Mysql::getInstance()->getAllApplicationUsers(); // Rückgabe als String (kommagetrennt) if (isset($aArgs['string'])) { $sReturn = ''; $iUserAmount = count($aUsers); $iCountUser = 1; foreach ($aUsers as $sUser) { $sReturn .= $sUser; if ($iCountUser < $iUserAmount) { $sReturn .= ', '; $iCountUser++; } } return $sReturn; } } // Rückgabe als Array return $aUsers; }
/** * Application Accesstoken aus der Datenbank holen * (3-legged-oauth) * * @return array (token, secret) */ private function getApplicationTokenAndSecret() { $oToken = NULL; $sSecret = NULL; if (class_exists('Immocaster_Data_Mysql') && ($oData = Immocaster_Data_Mysql::getInstance()->getApplicationToken())) { $oToken = new OAuthToken($oData->ic_key, $oData->ic_secret); $sSecret = $oData->ic_secret; } return array($oToken, $sSecret); }