Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53295 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54652 invoked from network); 15 Jun 2011 16:23:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jun 2011 16:23:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.163 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.163 smtp163.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.163] ([67.192.241.163:33884] helo=smtp163.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/82-35374-89CD8FD4 for ; Wed, 15 Jun 2011 12:23:55 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp16.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 3C7AF4073B; Wed, 15 Jun 2011 12:23:49 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp16.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id DE06340710; Wed, 15 Jun 2011 12:23:48 -0400 (EDT) Message-ID: <4DF8DC94.5060009@sugarcrm.com> Date: Wed, 15 Jun 2011 09:23:48 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: "RQuadling@GMail.com" CC: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Getting a list of registered namespaces. From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > With pecl/http (DEV-2 branch) and the Functional extension (on github) > both creating namespaces within the extension, I think there is a > requirement for a mechanism to allow an extension to record the > namespace(s) that it has, in a similar fashion to how functions and > classes are known to core. There's no such thing as "registered namespaces", at least in the engine. Namespace is just a part of class/function name. You could enumerate classes/functions and split their names, but I'm not sure for what such list will be useful. Could you explain? > But, trawling all the classes and functions, extracting and > aggregating the namespace would really not seem to be the way to go. > And that wouldn't take into account the user defined namespaces. Again, there's no such thing as list of user defined namespaces, at runtime. You'd have to go through all classes/functions and split their names. Again, I'm not sure what would be the use of it. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227