public function setPriority($p) { $this->priority = $p; if ($this->ev !== null) { $this->ev->priority = $p; } }