I want to use the return method that comes with the Controller class to return interface information. Among them, code code I want to first define a list of constants, and then make it easy for all Controller layers to use.
first I write a base class of the control layer, in which the code code is defined as a static property. Its subclasses can then refer to the defined code through $this::CODE_NAMEl.
although the effect has been achieved, it feels a little wrong. Please tell me how to design this situation in general. Thank you:)