/** * Strip slashes from the super globals to reduce the \\ mess */ protected static function stripSlashesFromGlobals() { // do i need to do this chore? if (function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc() || ini_get('magic_quotes_sybase') && strtolower(ini_get('magic_quotes_sybase')) != "off") { // FANTASTIC. BAD BAD BAD SYSADMIN, NO GIFT FOR YOU ON THE NEXT SYSADMIN DAY StringHelper::stripSlashesRecursive($_GET); StringHelper::stripSlashesRecursive($_POST); StringHelper::stripSlashesRecursive($_COOKIE); } }
/** * Generate a random key * @return string */ public static function generateRandomKey() { return \GGS\Helpers\StringHelper::generateRandomString(static::KEY_LENGTH); }
/** * @return string */ public function __toString() { $className = StringHelper::getNameWithoutNamespaces(get_class($this)); return "{$className} #" . $this->getPkValue(); }