class - PHP OOP: Missing argument from construct -
I found that due to the creation of the WARNING: Models_index :: __ construct () argument for missing 1 argument : Unchangeable variable: parameter models_inx class in line 7 What is the problem .. which is equivalent var_dump has received the following notification and warning after properly passing it; This means that
var_dump ($ params) works, but then these errors occur.
Model_index class using the public function __ composition ($ params = '') , these errors would be the cause of the omissions , But I'm not sure why they are, or why it helps.
class router {public function __construct ( ) {$ Cont = New Controller ('Passing Pass'); }} New router; Class Control Core_Controller {Public Function __Conversion ($ params) {$ Model = $ this- & gt; Model ("model_index", $ params); }} Class core_controller {secure model model ($ model, $ params) {$ model = new model_ index ($ params); Return the new $ model; }} Class Models_index Core_Model {public function increases __ constructure ($ params) {var_dump ($ params); // line 7}}
new $ model :
Return the new $ model;
back to new model_index ();
Comments
Post a Comment