Last modified: 2011-06-06 16:45:47 UTC
Make a method to do checking of 0 or 1 of the parameters existence (like requireOnlyOneParameter), but without needing one of the parameters More a personal TODO. Hence crappy title If someone can think of a nice method name, it'd be appreciated ;)
I'm trying to remember my use case for this one now. HMMMMM
OH if ( isset( $params['users'] ) && isset( $params['ip'] ) ) { $this->dieUsage( 'bkusers and bkip cannot be used together', 'usersandip' ); } vs requireOnlyOneParameter if ( count( $intersection ) > 1 ) { $this->dieUsage( 'The parameters ' . implode( ', ', $intersection ) . ' can not be used together', 'invalidparammix' ); } elseif ( count( $intersection ) == 0 ) { $this->dieUsage( 'One of the parameters ' . implode( ', ', $required ) . ' is required', 'missingparam' ); } Something like that without the == 0 check/error it seeeems...
r89581