Page 1 of 1

Weird wording on documentation? "Abstract private method" ???

Posted: Mon Jul 23, 2007 6:06 pm
by ludicruz
http://api.joomla.org/
The has a graphic associated to an "Abstract private method." also there is no Protected method distinction anywhere.

I'm new to Joomla! but not to OOP, I hope thats a typo or an oversite. An Abstract private method will do nothing but give visibility errors.

Code: Select all

<?php
abstract class SuperDuperClass
{
  public function __construct()
  {
    $this->abstractPrivateMethod();
  }
  
  abstract private function abstractPrivateMethod(); //FATAL ERROR!!
}

class SuperSubClass extends SuperDuperClass
{
  private abstractPrivateMethod()
  {
    //won't even get here!
  }
}

$sub = new SuperSubClass(); //here neither
?>
Running this gives "Fatal error: Abstract function SuperDuperClass::abstractPrivateMethod() cannot be declared private in /home/ludicruz/dev/APF.php on line 9"

Just a heads up :)

Re: Weird wording on documentation? "Abstract private method" ???

Posted: Mon Jul 23, 2007 8:21 pm
by CirTap
Hi,

thanks for noticing. Any particular class(es) that's you have in mind?

Please remember that Joomla! is enirely written in PHP4 and none of these concepts really apply.
The information is taken from the phpDoc comments where "private" basically means (now) that it should be treated as such, but PHP4 won't prevent you from doing so.
The __constructor methods being abstract means it'll needs implementation in inherited classes, ie. JSessionStorage or JObject.

Have fun,
CirTap

Re: Weird wording on documentation? "Abstract private method" ???

Posted: Mon Jul 23, 2007 9:12 pm
by ludicruz
Nothing I noticed off-hand. But on that main page there are the symbols with definitions was what I was referring to.

oh I love your signature, I'd heard the deadline quote. But the fast, well, and cheap is SOOO true!

Re: Weird wording on documentation? "Abstract private method" ???

Posted: Tue Jul 24, 2007 9:52 am
by CirTap
Hi,

now I see what you mean. I think those labels are based on the image names themself, which are part of phpDocumentor. This icon-set is rather "old" and never has changes since PHP 4.0 :)
I'll ask Chris to get this fixed.
ludicruz wrote: oh I love your signature, I'd heard the deadline quote. But the fast, well, and cheap is SOOO true!
thanks :)
Apparently for Joomla! 1.5 they picked well and cheap ;)

Have fun,
CirTap

Re: Weird wording on documentation? "Abstract private method" ???

Posted: Tue Jul 24, 2007 12:00 pm
by user deleted
Mod note; duplicate topic removed

Re: Weird wording on documentation? "Abstract private method" ???

Posted: Fri Aug 03, 2007 7:08 pm
by Chris Davenport
I have remove "abstract private method" from the SVN documentation (http://api.joomla.org/svn/).

It will be removed from http://api.joomla.org when RC2 is released.

Thanks for the heads-up.

Regards,
Chris.