Req #52505 [NEW]: Define namespace relative to current (namespace) context
| From: | robert dot de dot wilde at online dot nl | Date: | Sat, 31 Jul 2010 08:03:50 +0000 |
| Subject: | Req #52505 [NEW]: Define namespace relative to current (namespace) context | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-152990@lists.php.net to get a copy of this message | ||
From:
Operating system: Any
PHP version: 5.3.3
Package: *Programming Data Structures
Bug Type: Feature/Change Request
Bug description:Define namespace relative to current (namespace) context
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 bug report at http://bugs.php.net/bug.php?id=52505&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52505&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52505&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52505&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52505&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52505&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52505&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52505&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52505&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52505&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52505&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52505&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52505&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52505&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52505&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52505&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52505&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52505&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52505&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52505&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52505&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52505&r=mysqlcfg