Req #63526 [Opn->Wfx]: get_class(): New parameter to allow stripping of namespace

From: Date: Mon, 19 Nov 2012 03:24:49 +0000
Subject: Req #63526 [Opn->Wfx]: get_class(): New parameter to allow stripping of namespace
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-174792@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63526&edit=1

 ID:                 63526
 Updated by:         aharvey@php.net
 Reported by:        alex at arcomit dot co dot uk
 Summary:            get_class(): New parameter to allow stripping of
                     namespace
-Status:             Open
+Status:             Wont fix
 Type:               Feature/Change Request
 Package:            Class/Object related
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Agreed: reflection or simple string manipulation can handle this case, and most of the time you need
the fully qualified name anyway. Closing Won't Fix.


Previous Comments:
------------------------------------------------------------------------
[2012-11-15 18:01:57] nikic@php.net

Seems unnecessary to me, especially as you can always do (new
ReflectionObject($obj))->getShortName().

------------------------------------------------------------------------
[2012-11-15 11:38:12] alex at arcomit dot co dot uk

Description:
------------
Add a new parameter to get_class so it can return the class with the namespace removed.

string get_class ([ object $object = NULL ] , [ bool $stripNamespace = FALSE ] )



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63526&edit=1


Thread (3 messages)

« previous php.bugs (#174792) next »