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 self) {
self::$_instance = new self();
self::_init();
}
return self::$_instance;
}