Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
Remove references to Sanitize in Filtered
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnbowen committed Feb 2, 2012
1 parent 6d8aa99 commit 603688c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Filtered.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@ class Filtered
{

/**
* _sanitizedArray the sanitized result of the array/object
* _filtered the object accessed via __get() and __set()
*
* @var array
*/
private $_sanitizedArray = array();
private $_filtered = array();

/**
* __get If a nonexistent property of a Sanitize object is called, this
* __get If a nonexistent property of a Filtered object is called, this
* function checks to see if the property corresponds to a key of
* $this->_sanitizedArray, and returns that, otherwise it returns null.
* $this->_filtered, and returns that, otherwise it returns null.
*
* @param mixed $key
* @return void
*/
public function __get($key)
{
if (array_key_exists($key, $this->_sanitizedArray)
&& !empty($this->_sanitizedArray[$key])
if (array_key_exists($key, $this->_filtered)
&& !empty($this->_filtered[$key])
) {
return $this->_sanitizedArray[$key];
return $this->_filtered[$key];
} else {
return null;
}
}

public function __set($key, $value)
{
$this->_sanitizedArray[$key] = $value;
$this->_filtered[$key] = $value;
}

}

0 comments on commit 603688c

Please sign in to comment.