php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40457 ReflectionProperty lacks method getStartLine() / getEndLine()
Submitted: 2007-02-13 04:40 UTC Modified: 2011-04-08 21:40 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:5 of 5 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: ralph at smashlabs dot com Assigned:
Status: Open Package: Reflection related
PHP Version: 5.2.1 OS: Linux 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ralph at smashlabs dot com
New email:
PHP Version: OS:

 

 [2007-02-13 04:40 UTC] 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 ]
      }
    }


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-27 22:09 UTC] 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... :-(
 [2011-04-08 21:40 UTC] jani@php.net
-Package: Feature/Change Request +Package: Reflection related
 [2012-09-11 18:08 UTC] reeze@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 02:01:28 2024 UTC