/** * get instance of singleton * * @access public * @static * @param array $options * @return zerobin_data */ public static function getInstance($options = null) { // if given update the data directory if (is_array($options) && array_key_exists('dir', $options)) { self::$_dir = $options['dir'] . DIRECTORY_SEPARATOR; } // if needed initialize the singleton if (!self::$_instance instanceof zerobin_data) { self::$_instance = new self(); self::_init(); } return self::$_instance; }