Re: [PHP-DOC] listing inherited properties
On Apr 29, 2010, at 6:04 AM, Daniel Convissor wrote: > Hi Hannes: > > On Thu, Apr 29, 2010 at 10:49:34AM +0200, Hannes Magnusson wrote: >> >> I didn't even realize that built-in classes had private >> properties/methods. Seems utterly useless to tell the end-user that. > > You're right. They shouldn't be in the docs in the first place, even in > their original classes. Someone should hunt them down and remove them. Thankfully these only existed in a few places. They have all been removed, and the docgen script now ignores them. Regards, Philip
Re: [PHP-DOC] listing inherited properties
Hi Hannes: On Thu, Apr 29, 2010 at 10:49:34AM +0200, Hannes Magnusson wrote: > > I didn't even realize that built-in classes had private > properties/methods. Seems utterly useless to tell the end-user that. You're right. They shouldn't be in the docs in the first place, even in their original classes. Someone should hunt them down and remove them. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
Re: [PHP-DOC] listing inherited properties
On 29 April 2010 11:32, Richard Quadling wrote: > On 29 April 2010 11:12, Richard Quadling wrote: >> On 29 April 2010 10:26, Hannes Magnusson wrote: >>> On Thu, Apr 29, 2010 at 10:56, Richard Quadling >>> wrote: On 29 April 2010 09:49, Hannes Magnusson wrote: > On Thu, Apr 29, 2010 at 10:27, Richard Quadling > wrote: >> On 29 April 2010 08:50, Peter Cowburn wrote: >>> On 29 April 2010 08:18, Philip Olson wrote: Moments ago Yawk asked in IRC about why we list inherited methods but not inherited properties. Good question. So unless someone comes up with a reason, let's add them too. Okay? It can use the same form of xpointer inside the classname.xml files. >>> >>> Good call, thanks yawk! I've had a number of folks in the past ask my >>> about why a certain class constant is available but not in the docs so >>> it would be good to have them listed in the class synopsis. >>> >>> While we're on the topic, if anyone is looking to go through some >>> classes to add in these inherited constants then it would be worth >>> checking for inherited methods as well since not all classes have them >>> listed. >> >> As a test, I used the SPL's RunTimeException. >> >> http://docbook.org/ns/docbook) >> xpointer(id('class.exception')/descendant::db:fieldsynopsis)" /> >> >> works, but it includes the private properties. >> >> How can I extend that to exclude private >> >> I've tried ... >> >> http://docbook.org/ns/docbook) >> xpointer(id('class.exception')/descendant::db:fieldsynopsis[modifier!='private'])" >> /> >> >> I also see that the private methods are inherited. Clearly not right >> as you cannot call the base class's private method in a sub-class. > > I didn't even realize that built-in classes had private > properties/methods. Seems utterly useless to tell the end-user that. > > The problem here however is when a fieldsynopsis has a xml:id. > Thats gonna duplicate the ID and break the build.. > > I do however not have an alternative suggestion as doing this in PhD > would become crazy complicated really fast. > Surely that is no different to a methodsynopsis having an id? >>> >>> They usually don't. >>> >>> With fieldsynopsis however I think we often have xml:id so we can link >>> to a specific property when they are shown on the classreference page. >>> >>> -Hannes >>> >> >> As is used for properties and constants, we should >> only include "protected" and "public" modifiers for properties and >> methods. >> >> Still working on how to do this in the query. > > Looks like I've got it ... > > &InheritedProperties; > http://docbook.org/ns/docbook) > xpointer(id('class.exception')/descendant::db:fieldsynopsis[(db:modifier/text()='protected') > or (db:modifier/text()='public')])" /> > > &InheritedMethods; > http://docbook.org/ns/docbook) > xpointer(id('class.exception')/db:refentry/db:refsec...@role='description']/descendant::db:methodsynopsis[(db:modifier/text()='protected') > or (db:modifier/text()='public')])" /> Slight refinement. &InheritedProperties; http://docbook.org/ns/docbook) xpointer(id('class.exception')/descendant::db:fieldsynopsis[(db:modifier='protected') or (db:modifier='public')])" /> &InheritedMethods; http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsec...@role='description']/descendant::db:methodsynopsis[(db:modifier='protected') or (db:modifier='public')])" /> -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling
Re: [PHP-DOC] listing inherited properties
On 29 April 2010 10:26, Hannes Magnusson wrote: > On Thu, Apr 29, 2010 at 10:56, Richard Quadling > wrote: >> On 29 April 2010 09:49, Hannes Magnusson wrote: >>> On Thu, Apr 29, 2010 at 10:27, Richard Quadling >>> wrote: On 29 April 2010 08:50, Peter Cowburn wrote: > On 29 April 2010 08:18, Philip Olson wrote: >> >> Moments ago Yawk asked in IRC about why we list inherited methods but >> not inherited properties. Good question. So unless someone comes up with >> a reason, let's add them too. Okay? It can use the same form of xpointer >> inside the classname.xml files. > > Good call, thanks yawk! I've had a number of folks in the past ask my > about why a certain class constant is available but not in the docs so > it would be good to have them listed in the class synopsis. > > While we're on the topic, if anyone is looking to go through some > classes to add in these inherited constants then it would be worth > checking for inherited methods as well since not all classes have them > listed. As a test, I used the SPL's RunTimeException. http://docbook.org/ns/docbook) xpointer(id('class.exception')/descendant::db:fieldsynopsis)" /> works, but it includes the private properties. How can I extend that to exclude private I've tried ... http://docbook.org/ns/docbook) xpointer(id('class.exception')/descendant::db:fieldsynopsis[modifier!='private'])" /> I also see that the private methods are inherited. Clearly not right as you cannot call the base class's private method in a sub-class. >>> >>> >>> I didn't even realize that built-in classes had private >>> properties/methods. Seems utterly useless to tell the end-user that. >>> >>> The problem here however is when a fieldsynopsis has a xml:id. >>> Thats gonna duplicate the ID and break the build.. >>> >>> I do however not have an alternative suggestion as doing this in PhD >>> would become crazy complicated really fast. >>> >> >> Surely that is no different to a methodsynopsis having an id? > > They usually don't. > > With fieldsynopsis however I think we often have xml:id so we can link > to a specific property when they are shown on the classreference page. > > -Hannes > I've just done a search in phpdoc/en for ... with no attributes. -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling
Re: [PHP-DOC] listing inherited properties
On 29 April 2010 11:12, Richard Quadling wrote: > On 29 April 2010 10:26, Hannes Magnusson wrote: >> On Thu, Apr 29, 2010 at 10:56, Richard Quadling >> wrote: >>> On 29 April 2010 09:49, Hannes Magnusson wrote: On Thu, Apr 29, 2010 at 10:27, Richard Quadling wrote: > On 29 April 2010 08:50, Peter Cowburn wrote: >> On 29 April 2010 08:18, Philip Olson wrote: >>> >>> Moments ago Yawk asked in IRC about why we list inherited methods but >>> not inherited properties. Good question. So unless someone comes up >>> with a reason, let's add them too. Okay? It can use the same form of >>> xpointer inside the classname.xml files. >> >> Good call, thanks yawk! I've had a number of folks in the past ask my >> about why a certain class constant is available but not in the docs so >> it would be good to have them listed in the class synopsis. >> >> While we're on the topic, if anyone is looking to go through some >> classes to add in these inherited constants then it would be worth >> checking for inherited methods as well since not all classes have them >> listed. > > As a test, I used the SPL's RunTimeException. > > http://docbook.org/ns/docbook) > xpointer(id('class.exception')/descendant::db:fieldsynopsis)" /> > > works, but it includes the private properties. > > How can I extend that to exclude private > > I've tried ... > > http://docbook.org/ns/docbook) > xpointer(id('class.exception')/descendant::db:fieldsynopsis[modifier!='private'])" > /> > > > > I also see that the private methods are inherited. Clearly not right > as you cannot call the base class's private method in a sub-class. > I didn't even realize that built-in classes had private properties/methods. Seems utterly useless to tell the end-user that. The problem here however is when a fieldsynopsis has a xml:id. Thats gonna duplicate the ID and break the build.. I do however not have an alternative suggestion as doing this in PhD would become crazy complicated really fast. >>> >>> Surely that is no different to a methodsynopsis having an id? >> >> They usually don't. >> >> With fieldsynopsis however I think we often have xml:id so we can link >> to a specific property when they are shown on the classreference page. >> >> -Hannes >> > > As is used for properties and constants, we should > only include "protected" and "public" modifiers for properties and > methods. > > Still working on how to do this in the query. > > -- > - > Richard Quadling > "Standing on the shoulders of some very clever giants!" > EE : http://www.experts-exchange.com/M_248814.html > EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp > Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 > ZOPA : http://uk.zopa.com/member/RQuadling > Looks like I've got it ... &InheritedProperties; http://docbook.org/ns/docbook) xpointer(id('class.exception')/descendant::db:fieldsynopsis[(db:modifier/text()='protected') or (db:modifier/text()='public')])" /> &InheritedMethods; http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsec...@role='description']/descendant::db:methodsynopsis[(db:modifier/text()='protected') or (db:modifier/text()='public')])" /> -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling
Re: [PHP-DOC] listing inherited properties
On 29 April 2010 10:26, Hannes Magnusson wrote: > On Thu, Apr 29, 2010 at 10:56, Richard Quadling > wrote: >> On 29 April 2010 09:49, Hannes Magnusson wrote: >>> On Thu, Apr 29, 2010 at 10:27, Richard Quadling >>> wrote: On 29 April 2010 08:50, Peter Cowburn wrote: > On 29 April 2010 08:18, Philip Olson wrote: >> >> Moments ago Yawk asked in IRC about why we list inherited methods but >> not inherited properties. Good question. So unless someone comes up with >> a reason, let's add them too. Okay? It can use the same form of xpointer >> inside the classname.xml files. > > Good call, thanks yawk! I've had a number of folks in the past ask my > about why a certain class constant is available but not in the docs so > it would be good to have them listed in the class synopsis. > > While we're on the topic, if anyone is looking to go through some > classes to add in these inherited constants then it would be worth > checking for inherited methods as well since not all classes have them > listed. As a test, I used the SPL's RunTimeException. http://docbook.org/ns/docbook) xpointer(id('class.exception')/descendant::db:fieldsynopsis)" /> works, but it includes the private properties. How can I extend that to exclude private I've tried ... http://docbook.org/ns/docbook) xpointer(id('class.exception')/descendant::db:fieldsynopsis[modifier!='private'])" /> I also see that the private methods are inherited. Clearly not right as you cannot call the base class's private method in a sub-class. >>> >>> >>> I didn't even realize that built-in classes had private >>> properties/methods. Seems utterly useless to tell the end-user that. >>> >>> The problem here however is when a fieldsynopsis has a xml:id. >>> Thats gonna duplicate the ID and break the build.. >>> >>> I do however not have an alternative suggestion as doing this in PhD >>> would become crazy complicated really fast. >>> >> >> Surely that is no different to a methodsynopsis having an id? > > They usually don't. > > With fieldsynopsis however I think we often have xml:id so we can link > to a specific property when they are shown on the classreference page. > > -Hannes > As is used for properties and constants, we should only include "protected" and "public" modifiers for properties and methods. Still working on how to do this in the query. -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling
Re: [PHP-DOC] listing inherited properties
On Thu, Apr 29, 2010 at 10:56, Richard Quadling wrote: > On 29 April 2010 09:49, Hannes Magnusson wrote: >> On Thu, Apr 29, 2010 at 10:27, Richard Quadling >> wrote: >>> On 29 April 2010 08:50, Peter Cowburn wrote: On 29 April 2010 08:18, Philip Olson wrote: > > Moments ago Yawk asked in IRC about why we list inherited methods but not > inherited properties. Good question. So unless someone comes up with a > reason, let's add them too. Okay? It can use the same form of xpointer > inside the classname.xml files. Good call, thanks yawk! I've had a number of folks in the past ask my about why a certain class constant is available but not in the docs so it would be good to have them listed in the class synopsis. While we're on the topic, if anyone is looking to go through some classes to add in these inherited constants then it would be worth checking for inherited methods as well since not all classes have them listed. >>> >>> As a test, I used the SPL's RunTimeException. >>> >>> http://docbook.org/ns/docbook) >>> xpointer(id('class.exception')/descendant::db:fieldsynopsis)" /> >>> >>> works, but it includes the private properties. >>> >>> How can I extend that to exclude private >>> >>> I've tried ... >>> >>> http://docbook.org/ns/docbook) >>> xpointer(id('class.exception')/descendant::db:fieldsynopsis[modifier!='private'])" >>> /> >>> >>> >>> >>> I also see that the private methods are inherited. Clearly not right >>> as you cannot call the base class's private method in a sub-class. >>> >> >> >> I didn't even realize that built-in classes had private >> properties/methods. Seems utterly useless to tell the end-user that. >> >> The problem here however is when a fieldsynopsis has a xml:id. >> Thats gonna duplicate the ID and break the build.. >> >> I do however not have an alternative suggestion as doing this in PhD >> would become crazy complicated really fast. >> > > Surely that is no different to a methodsynopsis having an id? They usually don't. With fieldsynopsis however I think we often have xml:id so we can link to a specific property when they are shown on the classreference page. -Hannes
Re: [PHP-DOC] listing inherited properties
On 29 April 2010 09:49, Hannes Magnusson wrote: > On Thu, Apr 29, 2010 at 10:27, Richard Quadling > wrote: >> On 29 April 2010 08:50, Peter Cowburn wrote: >>> On 29 April 2010 08:18, Philip Olson wrote: Moments ago Yawk asked in IRC about why we list inherited methods but not inherited properties. Good question. So unless someone comes up with a reason, let's add them too. Okay? It can use the same form of xpointer inside the classname.xml files. >>> >>> Good call, thanks yawk! I've had a number of folks in the past ask my >>> about why a certain class constant is available but not in the docs so >>> it would be good to have them listed in the class synopsis. >>> >>> While we're on the topic, if anyone is looking to go through some >>> classes to add in these inherited constants then it would be worth >>> checking for inherited methods as well since not all classes have them >>> listed. >> >> As a test, I used the SPL's RunTimeException. >> >> http://docbook.org/ns/docbook) >> xpointer(id('class.exception')/descendant::db:fieldsynopsis)" /> >> >> works, but it includes the private properties. >> >> How can I extend that to exclude private >> >> I've tried ... >> >> http://docbook.org/ns/docbook) >> xpointer(id('class.exception')/descendant::db:fieldsynopsis[modifier!='private'])" >> /> >> >> >> >> I also see that the private methods are inherited. Clearly not right >> as you cannot call the base class's private method in a sub-class. >> > > > I didn't even realize that built-in classes had private > properties/methods. Seems utterly useless to tell the end-user that. > > The problem here however is when a fieldsynopsis has a xml:id. > Thats gonna duplicate the ID and break the build.. > > I do however not have an alternative suggestion as doing this in PhD > would become crazy complicated really fast. > > -Hannes > Surely that is no different to a methodsynopsis having an id? -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling
Re: [PHP-DOC] listing inherited properties
On Thu, Apr 29, 2010 at 10:27, Richard Quadling wrote: > On 29 April 2010 08:50, Peter Cowburn wrote: >> On 29 April 2010 08:18, Philip Olson wrote: >>> >>> Moments ago Yawk asked in IRC about why we list inherited methods but not >>> inherited properties. Good question. So unless someone comes up with a >>> reason, let's add them too. Okay? It can use the same form of xpointer >>> inside the classname.xml files. >> >> Good call, thanks yawk! I've had a number of folks in the past ask my >> about why a certain class constant is available but not in the docs so >> it would be good to have them listed in the class synopsis. >> >> While we're on the topic, if anyone is looking to go through some >> classes to add in these inherited constants then it would be worth >> checking for inherited methods as well since not all classes have them >> listed. > > As a test, I used the SPL's RunTimeException. > > http://docbook.org/ns/docbook) > xpointer(id('class.exception')/descendant::db:fieldsynopsis)" /> > > works, but it includes the private properties. > > How can I extend that to exclude private > > I've tried ... > > http://docbook.org/ns/docbook) > xpointer(id('class.exception')/descendant::db:fieldsynopsis[modifier!='private'])" > /> > > > > I also see that the private methods are inherited. Clearly not right > as you cannot call the base class's private method in a sub-class. > I didn't even realize that built-in classes had private properties/methods. Seems utterly useless to tell the end-user that. The problem here however is when a fieldsynopsis has a xml:id. Thats gonna duplicate the ID and break the build.. I do however not have an alternative suggestion as doing this in PhD would become crazy complicated really fast. -Hannes
Re: [PHP-DOC] listing inherited properties
On 29 April 2010 08:50, Peter Cowburn wrote: > On 29 April 2010 08:18, Philip Olson wrote: >> >> Moments ago Yawk asked in IRC about why we list inherited methods but not >> inherited properties. Good question. So unless someone comes up with a >> reason, let's add them too. Okay? It can use the same form of xpointer >> inside the classname.xml files. > > Good call, thanks yawk! I've had a number of folks in the past ask my > about why a certain class constant is available but not in the docs so > it would be good to have them listed in the class synopsis. > > While we're on the topic, if anyone is looking to go through some > classes to add in these inherited constants then it would be worth > checking for inherited methods as well since not all classes have them > listed. > >> >> Regards, >> Philip >> >> > As a test, I used the SPL's RunTimeException. http://docbook.org/ns/docbook) xpointer(id('class.exception')/descendant::db:fieldsynopsis)" /> works, but it includes the private properties. How can I extend that to exclude private I've tried ... http://docbook.org/ns/docbook) xpointer(id('class.exception')/descendant::db:fieldsynopsis[modifier!='private'])" /> I also see that the private methods are inherited. Clearly not right as you cannot call the base class's private method in a sub-class. Richard. -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling
Re: [PHP-DOC] listing inherited properties
On 29 April 2010 08:18, Philip Olson wrote: > > Moments ago Yawk asked in IRC about why we list inherited methods but not > inherited properties. Good question. So unless someone comes up with a > reason, let's add them too. Okay? It can use the same form of xpointer inside > the classname.xml files. Good call, thanks yawk! I've had a number of folks in the past ask my about why a certain class constant is available but not in the docs so it would be good to have them listed in the class synopsis. While we're on the topic, if anyone is looking to go through some classes to add in these inherited constants then it would be worth checking for inherited methods as well since not all classes have them listed. > > Regards, > Philip > >
[PHP-DOC] listing inherited properties
Moments ago Yawk asked in IRC about why we list inherited methods but not inherited properties. Good question. So unless someone comes up with a reason, let's add them too. Okay? It can use the same form of xpointer inside the classname.xml files. Regards, Philip