php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #20118 aggregate() having no parent::
Submitted: 2002-10-27 06:52 UTC Modified: 2002-12-30 16:59 UTC
From: black@php.net Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.3 OS: linux (probablly windows also)
Private report: No CVE-ID: None
 [2002-10-27 06:52 UTC] black@php.net
if i agregate an object which is defined as such:

class something extends content { ... }

with a class making use of "parent::", it gives me a "no parent class available" - when it should recognise content as its parent

if i had no "extends content" i would think of this as valid, but this way i dont - parent:: should be available if the object which aggregates a class has a parent

perhaps something like the following should be considered as an example how method aggregation should work in 5.x (also the way it works in c++, basically i just did something i think is a php ekvivalent)

<?php

class testing
{
        function testing() {}
        function boo();
}

function testing::boo() {
        echo "a";
}


$classss = new testing;
$classss->boo();

?>

this way i could put functions into seperate files instead of having a 100k file with the class (if it requires that much code) -> having 10 5k files is easier to maintain than 1 50k file.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-13 15:42 UTC] black@php.net
bogus report, but the "testing::boo" for function definitions and function boo(); inside a class should still be possible - atleast for 5.0

its bogus because i didnt have aggregate support compiled in 4.2.3 (since its disabled by default for some reason)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC