Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 54 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. in_array on objects with circular references
  2. public function addField ($name, ifaceNode $field)
  3. {
  4.     // Prevent the same field being added multiple times
  5.     if (!in_array ($field, $this -> fields))
  6.     {
  7.         $this -> fields [$name] = $field;
  8.         $field -> setParent ($this);
  9.     }
  10.     else
  11.     {
  12.         throw new InvalidArgumentException ('This field cannot be added to this group');
  13.     }
  14.     return ($this);
  15. }
  16.    
  17. if (!in_array ($field, $this -> fields, true))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top