php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #67200 Creation of $parent psuedo-variable
Submitted: 2014-05-04 05:47 UTC Modified: 2014-05-04 05:52 UTC
From: todd at toddcrane dot com Assigned:
Status: Wont fix Package: Unknown/Other Function
PHP Version: Irrelevant OS: Ubuntu 12.04
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: todd at toddcrane dot com
New email:
PHP Version: OS:

 

 [2014-05-04 05:47 UTC] todd at toddcrane dot com
Description:
------------
I am requesting a pseudo variable be created to reference an instance's parent instance. For example, within an instance of class 'team' there are instances of class 'players' created. This will allow public methods and properties belonging to the 'team' instance to be called from one of the 'players' instance.

Test script:
---------------
http://pastebin.com/eLBnx1dY


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-04 05:52 UTC] requinix@php.net
-Status: Open +Status: Wont fix
 [2014-05-04 05:52 UTC] requinix@php.net
The concept of "an instance's parent instance" is completely dependent on your code and the application. It would make no sense for PHP itself to implement something like that.

Make player's constructor take a parameter for the "parent" team. Problem solved.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 22:01:30 2024 UTC