public static function neutralizeObject($object, $strip = null)
    {
        $_variables = is_array($object) ? $object : get_object_vars($object);

        if (!empty($_variables)) {
            foreach ($_variables as $_key => $_value) {
                $_originalKey = $_key;

                if ($strip) {
                    $_key = str_replace($strip, null, $_key);
                }

                $_variables[static::neutralize(ltrim($_key, '_'))] = $_value;
                unset($_variables[$_originalKey]);
            }
        }

        return $_variables;
    }
public static function neutralizeObject($object, $strip = null)
    {
        $_variables = is_array($object) ? $object : get_object_vars($object);

        if (!empty($_variables)) {
            foreach ($_variables as $_key => $_value) {
                $_originalKey = $_key;

                if ($strip) {
                    $_key = str_replace($strip, null, $_key);
                }

                $_variables[static::neutralize(ltrim($_key, '_'))] = $_value;
                unset($_variables[$_originalKey]);
            }
        }

        return $_variables;
    }
public static function neutralizeObject ( $ object , $ strip = null ) { $ _variables = is_array ( $ object ) ? $ object : get_object_vars ( $ object ) ; if ( ! empty ( $ _variables ) ) { foreach ( $ _variables as $ _key => $ _value ) { $ _originalKey = $ _key ; if ( $ strip ) { $ _key = str_replace ( $ strip , null , $ _key ) ; } $ _variables [ static :: neutralize ( ltrim ( $ _key , '_' ) ) ] = $ _value ; unset ( $ _variables [ $ _originalKey ] ) ; } } return $ _variables ; }
Given an object, returns an array containing the variables of the object and their values.
The keys for the object have been neutralized for your protection

@param object $object
@param string $strip If provided, it's value is removed from item before it's neutralized.
Example: "REQUEST_URI" would be "URI" with $strip = "REQUEST_"

@return string
Given an object returns an array containing the variables of the object and their values . The keys for the object have been neutralized for your protection