In my previous system framework, the CONTROLLER layer customized an instance method for loading a specified MODEL. Now I want to use Composerautoload and discard the instance method that previously loaded the MODEL. But if I close this method directly, there are a lot of code involved. I want to change the method to "already passed" first... in my previous system framework, the CONTROLLER layer customized an instance method for loading a specified MODEL.
Now I want to use Composer autoload and discard the instance method that previously loaded the MODEL. But if I close this method directly, there are a lot of code involved. I want to change the method to expired first, A warning is generated during development, but the program will not go wrong.
Reply content:
In my previous system framework, the CONTROLLER layer customized an instance method for loading a specified MODEL.
Now I want to use Composer autoload and discard the instance method that previously loaded the MODEL. But if I close this method directly, there are a lot of code involved. I want to change the method to expired first, A warning is generated during development, but the program will not go wrong.
/*** @ Deprecated */function foobar () {if (DEBUG) {// DEBUG is the custom DEBUG switch constant trigger_error ('foobar () is deprecated! ');} // Code}
Phpdoc has corresponding labels
/*** @ Deprecated */
Http://phpdoc.org/docs/latest/references/phpdoc/tags/deprecated.html