note 27105 added to keyword.parent

From: Date: Fri, 22 Nov 2002 21:35:50 +0000
Subject: note 27105 added to keyword.parent
Groups: php.notes 
Request: Send a blank email to php-notes+get-39878@lists.php.net to get a copy of this message
How do you best use inheritence without completely rewriting functions when new object attributes are needed for the class and have to be stored in a db? Ex: a generic article class has attributes: - title - content - date created a derived class needs to add: - date published - category Do I have to rewrite my create function with a complete new SQL statement, anybody have a good practice to make this easy to implement without re-coding the whole class to add the database changes? -- http://www.php.net/manual/en/keyword.parent.php http://master.php.net/manage/user-notes.php?action=edit+27105 http://master.php.net/manage/user-notes.php?action=delete+27105 http://master.php.net/manage/user-notes.php?action=reject+27105

« previous php.notes (#39878) next »