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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
47 - 25 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Apr 19 19:01:28 2024 UTC