public static function convert($data)
    {
        // Is it an object with a __toArray() method?
        if (is_object($data) and method_exists($data, '__toArray')) {
            // Hell yeah, we don't need to do anything.
            return $data->__toArray();
        }
        // Just an object, take its variables!
        elseif (is_object($data)) {
            // Create an array
            $array = array();

            // Loop over the classes variables
            foreach (get_class_vars($data) as $var => $val) {
                // And steal them! MY PRECIOUS!
                $array[$var] = $val;
            }

            // And return the array.
            return $array;
        }
        // Array containing other things?
        elseif (is_array($data)) {
            foreach ($data as $k => $v) {
                $data[$k] = static::convert($v);
            }
        }

        return $data;
    }