MCPcopy Create free account
hub / github.com/deuill/go-php / Set

Method Set

engine/receiver.go:106–113  ·  view source on GitHub ↗

Set assigns value to named internal property. If the named property does not exist or cannot be set, the method does nothing.

(name string, val interface{})

Source from the content-addressed store, hash-verified

104// Set assigns value to named internal property. If the named property does not
105// exist or cannot be set, the method does nothing.
106func (o *ReceiverObject) Set(name string, val interface{}) {
107 // Do not attempt to set non-existing or unset-able field.
108 if _, exists := o.values[name]; !exists || !o.values[name].CanSet() {
109 return
110 }
111
112 o.values[name].Set(reflect.ValueOf(val))
113}
114
115// Exists checks if named internal property exists and returns true, or false if
116// property does not exist.

Callers 2

engineSetHeaderFunction · 0.80
engineReceiverSetFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected