get_table() and get_searchable_fields() is abstract static function. but it is deprecated php 5.2 or higher. I can see error message on wordpress admin console, when debug mode is on.
I try to fix it and modified BaseModel.php, Comment.php, User.php, Post.php as follows.
remove get_table() and get_searchable_fields() to BaseModelInterface,
interface BaseModelInterface {
/**
* Overwrite this in your concrete class. Returns the table name used to
* store models of this class.
*
* @return string
*/
public static function get_table();
/**
* Get an array of fields to search during a search query.
*
* @return array
*/
public static function get_searchable_fields();
}
and add "use WordPress\ORM\BaseModelInterface;" at heads of "Comment.php, User.php, Post.php". I also add "implements BaseModelInteface" to Comment, User, Post class definition as well.
I'm github/php newbie so just post solution here. I don't want break your module. Sorry for my bad English too.
get_table() and get_searchable_fields() is abstract static function. but it is deprecated php 5.2 or higher. I can see error message on wordpress admin console, when debug mode is on. I try to fix it and modified BaseModel.php, Comment.php, User.php, Post.php as follows.
remove get_table() and get_searchable_fields() to BaseModelInterface,
and add "use WordPress\ORM\BaseModelInterface;" at heads of "Comment.php, User.php, Post.php". I also add "implements BaseModelInteface" to Comment, User, Post class definition as well.
I'm github/php newbie so just post solution here. I don't want break your module. Sorry for my bad English too.