Constructor problem

I have a base class, Base.php, that initializes the constructor.

public function __construct()
    {
        parent::__construct();
        $this->authWen();
    }
The

constructor calls a permission verification method. However, in addition to true or false, the result of this permission verification method is that a new token, is generated, that is, there are three return values for the permission verification method. Is there any way for the newly generated token to return together after executing other methods?

Mar.14,2021

  1. intra-class variables. Public,protected access control is inherited
  2. intra-class constant. Public can be inherited by subclasses and accessed externally
  3. Global variables, constants, and static variables within classes are not recommended

failed verification returns false
successful verification returns token

Menu