/** * get server salt * * @access public * @static * @return string */ public static function get() { if (strlen(self::$_salt)) { return self::$_salt; } $file = 'salt.php'; if (!self::_exists($file)) { self::_store($file, '<?php /* |' . self::generate() . '| */ ?>'); } $items = explode('|', file_get_contents(self::getPath($file))); self::$_salt = $items[1]; return $items[1]; }
/** * set the path * * @access public * @static * @param string $path * @return void */ public static function setPath($path) { self::$_salt = ''; parent::setPath($path); }