Req #40457 [Com]: ReflectionProperty lacks method getStartLine() / getEndLine()

From: Date: Tue, 11 Sep 2012 18:08:12 +0000
Subject: Req #40457 [Com]: ReflectionProperty lacks method getStartLine() / getEndLine()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-173339@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=40457&edit=1

 ID:                 40457
 Comment by:         reeze@php.net
 Reported by:        ralph at smashlabs dot com
 Summary:            ReflectionProperty lacks method getStartLine() /
                     getEndLine()
 Status:             Open
 Type:               Feature/Change Request
 Package:            Reflection related
 Operating System:   Linux 2.6
 PHP Version:        5.2.1
 Block user comment: N
 Private report:     N

 New Comment:

I like the idea, but those information didn't exists in runtime as class/functions
just for this request to implement this seems a waste.


Previous Comments:
------------------------------------------------------------------------
[2010-07-27 22:09:52] rasmus at mindplay dot dk

Yes, this is missing for me too. Badly.

Trying to work around this by manually scanning the source code for the property definition would be
a huuuge PITA... :-(

------------------------------------------------------------------------
[2007-02-13 04:40:08] ralph at smashlabs dot com

Description:
------------
Simply put, when getting a property (in the same manner as a method) from a class,
ReflectionProperty lacks the ability (as does the ReflectionClass) to retrieve a line number from
where the property was defined.

  - Properties [1] {
    Property [ <default> protected $_Id ]
  }

  - Methods [3] {
    Method [ <user, overwrites Submission> public method get ] {
      @@ /home/webdeveloper/vhosts/zdiis2.dev/development/modeling/models/ZDISubmission.php 11 - 14

      - Parameters [1] {
        Parameter #0 [ <optional> $identifiers = Array ]
      }
    }



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



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


Thread (3 messages)

« previous php.bugs (#173339) next »