php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57029 Add functionality to rename class attributes
Submitted: 2006-05-21 06:52 UTC Modified: 2011-10-27 07:15 UTC
From: sebastian@php.net Assigned: sebastian (profile)
Status: Closed Package: runkit (PECL)
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2006-05-21 06:52 UTC] sebastian@php.net
Description:
------------
I could not find functionality to rename class attributes (and obviously need it ;-).

Reproduce code:
---------------
<?php
class Foo {
  private $bar;
  protected $bar2;
  public $bar3;
}

runkit_property_rename('Foo', 'bar', 'baz');
runkit_property_rename('Foo', 'bar2', 'baz2');
runkit_property_rename('Foo', 'bar3', 'baz3');
?>


Expected result:
----------------
<?php
class Foo {
  private $baz;
  protected $baz2;
  public $baz3;
}
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-27 07:15 UTC] sebastian@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: sebastian
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 08:01:29 2024 UTC