Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Fatal error: Class 'Custom' contains 1 abstract method and must therefore be declared abstract or (http://www.mysidiaadoptables.com/forum/showthread.php?t=5026)

FounderSim 02-16-2016 10:18 PM

Fatal error: Class 'Custom' contains 1 abstract method and must therefore be declared abstract or
 
Quote:

Fatal error: Class 'CustomClass" contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Model::save) in path/catisserie/classes/class_customclass.php on line 80

confused.

Line 80 is last line of file. This happens when I initiate the class
$boom = new CustomClass();

I got no paramaters in my constructor. it's more of a helper.

pachoofoosh 02-17-2016 10:56 AM

Mysidia's Model class is abstract, so any classes that inherit it need to define its methods. The error is saying you do not have a save() method in customclass.php.

The class_model.php's save method:
PHP Code:

protected abstract function save($field$value); 

Try adding this to your class_customclass.php file:
PHP Code:

protected function save($field$value) {} 


FounderSim 02-17-2016 08:28 PM

Quote:

Originally Posted by pachoofoosh (Post 33856)
Mysidia's Model class is abstract, so any classes that inherit it need to define its methods. The error is saying you do not have a save() method in customclass.php.

The class_model.php's save method:
PHP Code:

protected abstract function save($field$value); 

Try adding this to your class_customclass.php file:
PHP Code:

protected function save($field$value) {} 


Good stuff. Works like a charm. I suppose I should have looked into the Model class. =}


All times are GMT -5. The time now is 02:48 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.