system/classes/Collection.php
public function where($key = false, $desiredValue, $op = "==")
    {
        $collection = $this->getIterator();
        $subset = new Collection();

        foreach($collection as $prop => $result) {
            // Grab resource value
            $realValue = $result;
            if (is_object($result)) {
                $realValue = $result->$key;
            }
            else if (is_array($result)) {
                $realValue = $result[$key];
            }

            // Check value against operator given
            $add = false;
            if ($op == '==' && $realValue == $desiredValue) {
                $add = true;
            }
            else if ($op == '>=' && $realValue >= $desiredValue) {
                $add = true;
            }
            else if ($op == '<=' && $realValue <= $desiredValue) {
                $add = true;
            }
            else if ($op == '>' && $realValue > $desiredValue) {
                $add = true;
            }
            else if ($op == '<' && $realValue < $desiredValue) {
                $add = true;
            }
            else if ($op == '===' && $realValue === $desiredValue) {
                $add = true;
            }
            else if ($op == '!=' && $realValue != $desiredValue) {
                $add = true;
            }

            // Add the resource to the subset if valid
            if ($add) {
                $subset->add($result, $prop);
            }
        }
        return $subset;
    }
public function where($key = false, $desiredValue, $op = "==")
    {
        $collection = $this->getIterator();
        $subset = new Collection();

        foreach($collection as $prop => $result) {
            // Grab resource value
            $realValue = $result;
            if (is_object($result)) {
                $realValue = $result->$key;
            }
            else if (is_array($result)) {
                $realValue = $result[$key];
            }

            // Check value against operator given
            $add = false;
            if ($op == '==' && $realValue == $desiredValue) {
                $add = true;
            }
            else if ($op == '>=' && $realValue >= $desiredValue) {
                $add = true;
            }
            else if ($op == '<=' && $realValue <= $desiredValue) {
                $add = true;
            }
            else if ($op == '>' && $realValue > $desiredValue) {
                $add = true;
            }
            else if ($op == '<' && $realValue < $desiredValue) {
                $add = true;
            }
            else if ($op == '===' && $realValue === $desiredValue) {
                $add = true;
            }
            else if ($op == '!=' && $realValue != $desiredValue) {
                $add = true;
            }

            // Add the resource to the subset if valid
            if ($add) {
                $subset->add($result, $prop);
            }
        }
        return $subset;
    }
Returns a SUBSET of the results.
If no matching subset exists, returns an empty Container.

Example would be if bunch of User objects were stored in this Container and you
wanted to return a subset of Users who's "Type" is equal to "Admin".
Container->where('Type', 'Admin');

@param key A key to look at when comparing the operator and the desired value.
@param desiredValue The value to compare against.
@param op The operator used in comparision.
@return A Container with the matching resources.