public function __construct($nodeid, $nodetype = "", $user = "") { //unfortunately this has been used extensively in non node contexts //despite its name and cleaning that up is going to be it's own exercise. //so we hack around that here if (is_numeric($nodeid)) { $this->nodeid = $nodeid; if (!$nodetype) { $nodetype = 'node'; } if ($user) { parent::__construct('node_permission_user', array($nodeid, $nodetype, $user)); } else { parent::__construct('node_permission', array($nodeid, $nodetype)); } } else { $this->nodeid = 0; parent::__construct('node_permission_section', array($nodeid)); } }