Access level constrains in php5 really suck

posted: January 4th, 2006 · by: Sven

in: Programming · tagged as: , , ·  5 comments »

I can’t understand why I’m being forced to keep the access level of a class’s method when I extend it.

class SomeFactory extends PEAR_Delegator {    
    protected function __construct() {
    }    
    public static function instance() {
    }
}

... would make perfectly sense IVHMO. But it throws …

"Fatal error: Access level to ActivePdo_Relation::__construct() 
must be public (as in class PEAR_Delegator)" 

What’s the reasoning behind this?

That’s because I’m “doing something terribly wrong”, is it? Not the “php way”? Boy, this sucks.

Leave a comment

5 Comments

  1. Interested Party said January 12th, 2007 at 10:41 AM  

    What are your opinions of PEAR_Delegator?

  2. Sven said January 26th, 2007 at 08:51 AM  

    I believe it's a highly useful package. :)

    I've been talking to the developer at that time and came to the opinion that he really knows what he's doing.

    Unfortunately the package doesn't seem to be maintained that active - "0.1.0 (alpha) was released on 2005-04-10" according to http://pear.php.net/package/PEAR_Delegator

    So there doesn't seem to be that much demand either.

  3. jack said January 24th, 2011 at 03:28 PM  

    UCVHOST has changed the face of web hosting industry in a major way, people were paying gold for peanuts (and it is still happening). cheap hosting has become synonym with UCVHOST, anybody and everybody who wants a reliable and affordable domain web hosting visits UCVHOST and gets either windows vps or Linux hosting from UCVHOST. UCVHOST sells cheap hosting WITHOUT hidden terms and conditions where as competition has huge MSA and SLA’s which are good enough to confuse a seasoned lawyer also. For clients by now Business with us for the value of windows vps became very critical piece of puzzle for their whole operation, uptime and performance became a huge concern.. However it came with a cost, dedicated servers proved to be at least 100 times expensive in comparison to any windows or Linux plans. Somewhere in the labs engineers were working on splicing raw power of a server into virtual instances, this technology was called as Virtualization also termed as or virtual private servers. Also UCVHOST comes handy when you are looking for remotely hosted and managed FOREX MetaTrader4 terminals. Our forex vps platform is all geared up in fight of pips, our platform support any number of expert advisory (EA) and along with an assure of 100% uptime. Our Virtual Forex Tradng Terminals are well equipped to help you in making money .

  4. chat said March 31st, 2011 at 08:21 PM  

    The following cleaned up the issue:

    Dependencies.loadoncepaths -= Dependencies.loadoncepaths.select{|path| \ path =~ %r(^#{File.dirname(FILE)}) }

  5. Okey oyunu said May 12th, 2011 at 04:28 PM  

    Thanks a lot for this nice post. Tüm dünya artik okey oyunu oynuyor. Yillardir bir çok oyun programi olmasina ragmen, içlerinden en güzeli olarak nitelendirebilecegimiz tek bir site göze çarpmaktadir. Diger tüm okey oyunu programlarinin aksine ücretsiz olmasi ve 3 boyutlu olarak hizmet vermesi mükemmel bir gelismedir. Sizlerde www.okey-oyunu.com adresinden bu essiz okey oyununu indirebilirsiniz. Kullanimi çok basit ve Türkçe dil seçenegi ile kolaylikla oyuna baslayabilirsiniz. Ister kendi ülkenizden, isterseniz dünyanin tüm farkli bölgelerinden dilediginiz oyun odalarini seçerek, oyuna hemen baslayabilirsiniz. Okey oyunu oynamak için artik arkadas bile aramaniza gerek kalmadan, bilgisayarinizdan 100 binlerce üye ile online olarak okey oyununu oynamanin zevkine varabilirsiniz.

Sorry, comments are closed for this article.

artweb design
Sven Fuchs
Grünberger Str. 65
10245 Berlin, Germany


http://www.artweb-design.de

Fon +49 (30) 47 98 69 96
Fax +49 (30) 47 98 69 97