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

Reply via email to