|
Posted by Toby A Inkster on 07/23/07 14:51
Sanders Kaufman wrote:
> Vocabulary question: When I do this, what is the OOP thing that I'm
> doing? You said that my use of an object as a property of the parent
> class was "aggregation. So - when I use use "extends" to create the
> child's reference to the parent - wassat? Marshalling? Inheritance?
I didn't say that, no.
<?php
/* Aggragation */
class A {}
class B
{
public $a = new A;
}
?>
<?php
/* Inheritance */
class A {}
class B extends A {}
?>
<?php
/* Implementation */
interface A {}
class B implements A {}
?>
<?php
/* Instantiation */
class A {}
$a = new A;
?>
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 32 days, 18:28.]
Parsing an HTML Table with PEAR's XML_HTTPSax3
http://tobyinkster.co.uk/blog/2007/07/20/html-table-parsing/
Navigation:
[Reply to this message]
|