Re: Namespaces Extends?

From: Date: Wed, 12 Dec 2007 16:39:41 +0000
Subject: Re: Namespaces Extends?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-33976@lists.php.net to get a copy of this message
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..? Either one is fine. Greg

« previous php.internals (#33976) next »