I have an array of objects and I am trying to reference the name of the object inside of the object. An example would look something like:
private 'inputs' =>
array
'displayName' =>
object(Input)[2]
private 'field' => string 'test' (length=17)
private 'rules' => string 'test' (length=23)
'inputTwo' =>
object(Input)[3]
private 'field' => string 'test' (length=17)
private 'rules' => string 'test' (length=23)
and reference the ‘disaplyName’ inside object operations.
Then add a
displayNameproperty to the object and set a name to it. Making something outside the object part of the required working of the object is somewhere between bad design and not possible.$inputs['displayName']is a variable that holds the object, you can’t really create a circular dependency between the object and the variable that holds the object.Unless I totally misunderstood what you’re asking, in which case: please clarify what you want to do.