What does it mean to have an event in the parameters of the method?

// PHP 
interface process {
    public function process() {
        echo "aaaaa";
    }
}

class event {
    private $m;
    public function __construct($me) {
        $this->m = $me;
    }
    public function click () {
        echo "ffff";
    }
}

class playProcess {
    private $msg = null;
    public function __construct() {
    }
    public function callback (event $event) {
        $this->msg = $event->click();
        if ($this->msg instanceof process) {
            $this->msg->process();
        }
    }
}
The

code is as above, what is the meaning of the event before the $event parameter in the above callback method? What"s the use?

Php
Mar.09,2021

event is the class name, indicating that the variable $event should be an object of event,

is like int in int sum (int a, int b); in C language

Menu