Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33975 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63098 invoked by uid 1010); 12 Dec 2007 15:37:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 63077 invoked from network); 12 Dec 2007 15:37:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Dec 2007 15:37:24 -0000 X-Host-Fingerprint: 82.41.129.160 82-41-129-160.cable.ubr02.glen.blueyonder.co.uk Received: from [82.41.129.160] ([82.41.129.160:4941] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/71-53174-03000674 for ; Wed, 12 Dec 2007 10:37:22 -0500 Message-ID: To: internals@lists.php.net Date: Wed, 12 Dec 2007 15:36:50 +0000 Reply-To: nrixham@gmail.com User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 References: <32.2E.38526.E96DF574@pb1.pair.com> In-Reply-To: <32.2E.38526.E96DF574@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 82.41.129.160 Subject: Re: Namespaces Extends? From: nrixham@gmail.com (Nathan Rixham) Scratch that, took the time to test myself.. namespace core; { class base { protected function __construct() { } } class core extends core::base{ protected function __construct() { } } } namespace application_test; { class extender extends core::core { } } $test_extender = new application_test::extender; works just fine - apologies for cluttering the board and indeed posting in the wrong one! Nathan Nathan Rixham wrote: > Hate to bring this one up; I'll be brief! > > for instance smarty get's upgraded and has it's own namespace, I have a > class which extends it, soon to be in my applications namespace which > implements an interface in my interfaces namespace.. how does one extend > a class in another namespace and indeed implement? > > namespace application::handlers; > { > class class_name extends ::b::class_in_other_namespace implements > ::c::iTemplate{ > public func... > } > } > > or would we.. > > namespace application::handlers; > { > use b::class_in_other_namespace as other_class; > use c::interface_in_other_namespace as other_interface; > class class_name extends other_class implements other_interface { > public func... > } > } > > or..? > > Thanks!