-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi.
- --On 02.05.2002 11:31:34 +0400 Victor Kapustin wrote: > My current work would be much more comfortable if I could use > constructs like > > class MyEvent extends event ... > > Though Midgard manual describes Midgard entities (Object, Topic, > Person, Event etc.) like classes, I don't see any way to inherit from > them. > > Any advice? The classes are called MidgardEvent or MidgardArticle respectivly. Unfortunalety, inheriting from those classes is not so easy than it might imagine, you can run into a lot of problems. Take a look at http://www.nathan-syntronics.de/midgard/oop for a quick guide. BTW: What didn't make it to the web pages yet: The _copyMgdData function do the manual copy on purpose to ensure that _all_ required variables are defined in the new class. A PHP-like approach using something like $variables = get_object_vars($object); foreach($variables as $var => $data) $this->$var = $data; does not always work cleanly, you can get errors due to missing variables which are very hard to trace, believe me... Live long and prosper! Torben Nehmer - -- Torben Nehmer, Munich, Germany http://www.nathan-syntronics.de, mailto:[EMAIL PROTECTED] PGP Public Key ID on wwwkeys.(de.)pgp.net: 0x7E9DE456 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Weitere Infos: siehe http://www.gnupg.org iD8DBQE80PK4JPh4Kn6d5FYRAk5SAKCsscrIs7B694k2y2NH2twAc1x8BQCg3aO5 Qr6A9RQ7/q5AcCWi8Shk+9c= =jjC8 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
