Interface returns the internal PHP value as it lies, with no conversion step.
()
| 176 | |
| 177 | // Interface returns the internal PHP value as it lies, with no conversion step. |
| 178 | func (v *Value) Interface() interface{} { |
| 179 | switch v.Kind() { |
| 180 | case Long: |
| 181 | return v.Int() |
| 182 | case Double: |
| 183 | return v.Float() |
| 184 | case Bool: |
| 185 | return v.Bool() |
| 186 | case String: |
| 187 | return v.String() |
| 188 | case Array: |
| 189 | return v.Slice() |
| 190 | case Map, Object: |
| 191 | return v.Map() |
| 192 | } |
| 193 | |
| 194 | return nil |
| 195 | } |
| 196 | |
| 197 | // Int returns the internal PHP value as an integer, converting if necessary. |
| 198 | func (v *Value) Int() int64 { |