CI_DB_query_builder::_object_to_array PHP Method

_object_to_array() protected method

Takes an object as input and converts the class variables to array key/vals
protected _object_to_array ( $object ) : array
return array
    protected function _object_to_array($object)
    {
        if (!is_object($object)) {
            return $object;
        }
        $array = array();
        foreach (get_object_vars($object) as $key => $val) {
            // There are some built in keys we need to ignore for this conversion
            if (!is_object($val) && !is_array($val) && $key !== '_parent_name') {
                $array[$key] = $val;
            }
        }
        return $array;
    }