Re: Namespaces Extends?

From: Date: Wed, 12 Dec 2007 15:36:50 +0000
Subject: Re: Namespaces Extends?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-33975@lists.php.net to get a copy of this message
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!


« previous php.internals (#33975) next »