This allows you to chain calls eg
$query = new JoinAndQuery();
$query->_AND($a)->_AND($b)->_AND($c);
Quite often used with query builders (like in your case)
Alexei
On 16/09/2010 10:39, Todd Jackson wrote:
Excuse me for my ignorance, but can someone explain what 'return %this' does in
the following syntax, I don't see this often.
The $query var is an instance of the JoinAndQuery class, so why would I use
'return $this'?
$query = new JoinAndQuery();
class JoinAndQuery extends JoinQuery {
protected $symbol = '&';
public function _AND(LdapQuery $query) {
$this->queries[] = $query;
return $this;
}
}
Regards
Todd.
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]