Req #52505 [Opn]: Define namespace relative to current (namespace) context
| From: | robert dot de dot wilde at online dot nl | Date: | Sat, 31 Jul 2010 08:04:18 +0000 |
| Subject: | Req #52505 [Opn]: Define namespace relative to current (namespace) context | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-152991@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52505&edit=1
ID: 52505
User updated by: robert dot de dot wilde at online dot nl
Reported by: robert dot de dot wilde at online dot nl
Summary: Define namespace relative to current (namespace)
context
Status: Open
Type: Feature/Change Request
Package: *Programming Data Structures
Operating System: Any
PHP Version: 5.3.3
Block user comment: N
New Comment:
content > context
Previous Comments:
------------------------------------------------------------------------
[2010-07-31 10:03:49] robert dot de dot wilde at online dot nl
Description:
------------
Sometimes it would be usefull to be able to define namespace relative to
the current namespace content, for example in case of includes/requires
where the same .skel is used over and over. See test script.
Test script:
---------------
// global file
namespace MyNS\Usr\Models
{
require_once('MadMans\class.MadMansModel.php');
print_r(
new MadMan\MadMansModel() /* which refers to
MyNs\Usr\Models\MadMan\MadMansModel */
);
}
// required file
namespace .\MadMan
{
class MadMansModel
{ // ..
}
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52505&edit=1