Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- in_array on objects with circular references
- public function addField ($name, ifaceNode $field)
- {
- // Prevent the same field being added multiple times
- if (!in_array ($field, $this -> fields))
- {
- $this -> fields [$name] = $field;
- $field -> setParent ($this);
- }
- else
- {
- throw new InvalidArgumentException ('This field cannot be added to this group');
- }
- return ($this);
- }
- if (!in_array ($field, $this -> fields, true))
Add Comment
Please, Sign In to add comment