/**
  * 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);
     }
 }
Ejemplo n.º 2
0
 /**
  * Generate a random key
  * @return string
  */
 public static function generateRandomKey()
 {
     return \GGS\Helpers\StringHelper::generateRandomString(static::KEY_LENGTH);
 }
Ejemplo n.º 3
0
 /**
  * @return string
  */
 public function __toString()
 {
     $className = StringHelper::getNameWithoutNamespaces(get_class($this));
     return "{$className} #" . $this->getPkValue();
 }