From 9b3a24207bd5c648c83d076041ff90d4ebd2dd0a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 3 Sep 2006 20:06:55 +0000 Subject: [PATCH] No longer use underscores in the API. This is a very breaking-heavy commit. --- Input.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Input.php b/Input.php index 5d5a63b..d53ea67 100644 --- a/Input.php +++ b/Input.php @@ -112,11 +112,11 @@ class BSInput BSLoader::GetRegister()->debug('magic_quotes_gpc = ' . $this->magicquotes); BSLoader::GetRegister()->debug('register_globals = ' . ini_get('register_globals')); - $this->exec_sanitize_data(); + $this->sanitizeInputData(); if (defined('ISSO_CHECK_POST_REFERER')) { - $this->exec_referer_check(); + $this->checkPostReferer(); } } @@ -128,7 +128,7 @@ class BSInput * * @return mixed Sanitized data */ - public function _sanitize_input_recursive($data) + private function sanitizeDataRecursive($data) { foreach ($data AS $key => $value) { @@ -176,7 +176,7 @@ class BSInput * * @return string Unicode-safe sanitized text with entities preserved */ - public function entity_encode($text) + public function entityEncode($text) { $text = str_replace('&', '&', $text); $text = $this->sanitize($text); @@ -232,37 +232,37 @@ class BSInput /** * Runs through all of the input data and sanitizes it. */ - private function exec_sanitize_data() + private function sanitizeInputData() { - $this->in = $this->_sanitize_input_recursive(array_merge($_GET, $_POST, $_COOKIE)); + $this->in = $this->sanitizeDataRecursive(array_merge($_GET, $_POST, $_COOKIE)); } // ################################################################### /** * Sanitize function for something other than a string (which - * everything is sanitized for if you use exec_sanitize_data(). Cleaned - * data is placed back into $isso->in; this makes it so you don't have + * everything is sanitized for if you use sanitizeInputData(). Cleaned + * data is placed back into ISSO->in; this makes it so you don't have * to constantly intval() [etc.] data. * * @param array Array of elements to clean as varname => type */ - public function input_clean_array($vars) + public function inputCleanArray($vars) { foreach ($vars AS $varname => $type) { - $this->input_clean($varname, $type); + $this->inputClean($varname, $type); } } // ################################################################### /** * Sanitize function that does a single variable as oppoesd to an array - * (see input_clean_array() for more details) + * (see inputCleanArray() for more details) * - * @param string Variable name in $isso->in[] + * @param string Variable name in ISSO->in[] * @param integer Sanitization type constant */ - public function input_clean($varname, $type) + public function inputClean($varname, $type) { if (isset($this->in["$varname"])) { @@ -287,7 +287,7 @@ class BSInput * * @return string Escaped input */ - public function input_escape($varname) + public function inputEscape($varname) { if (isset($this->in["$varname"])) { @@ -301,9 +301,9 @@ class BSInput // ################################################################### /** - * Cleaning function that does the work for input_clean(); this is + * Cleaning function that does the work for inputClean(); this is * moved here so it can be used to clean things that aren't in - * $isso->in[] + * ISSO->in[] * * @param mixed Data * @param integer Sanitization type constant @@ -314,7 +314,7 @@ class BSInput { if (is_array($value)) { - return $this->clean_array($value, $type); + return $this->cleanArray($value, $type); } if ($type == TYPE_INT) @@ -374,7 +374,7 @@ class BSInput * * @return array Cleaned array of data */ - private function clean_array($array, $type) + private function cleanArray($array, $type) { foreach ($array AS $key => $value) { @@ -388,7 +388,7 @@ class BSInput /** * Checks to see if a POST refer is actually from us */ - public function exec_referer_check() + private function checkPostReferer() { if ($_SERVER['REQUEST_METHOD'] == 'POST') { -- 2.43.5