#878: Change singular/plural handling in AgaviXmlConfigDomElement convenience
methods
--------------------+-------------------------------------------------------
 Reporter:  david   |       Owner:  david     
     Type:  task    |      Status:  new       
 Priority:  normal  |   Milestone:  1.0       
Component:  config  |     Version:  1.0.0beta1
 Severity:  major   |    Keywords:            
Has_patch:  0       |  
--------------------+-------------------------------------------------------
 The automatic handling of {{{<plurals>}}} container elements with
 {{{<plural>}}} children is a bit random and incomplete at the moment.
 We should change it to behave like this (discussed on IRC):
  * {{{getChild()}}} does no magic, returns exactly one child element of
 the given name if only exactly one child element of the given name exists
  * {{{hasChild()}}} bool of the above
  * {{{getChildren()}}} gets a third argument, defaulting to {{{false}}},
 to switch on the singular/plural handling
  * {{{countChildren()}}} and {{{hasChildren()}}} work the same way
  * new {{{get()}}} and {{{has()}}} methods are shortcuts for calling
 {{{getChildren()}}} and {{{hasChildren()}}} with the third arg to true
 Mind you we cannot use {{{__get()}}}/{{{__isset()}}} overloads for the
 plural magic as originally planned as the parent {{{DOMElement}}} and
 {{{DOMNode}}} classes define a couple of public properties already.

-- 
Ticket URL: <http://trac.agavi.org/ticket/878>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to