Hi,

It return the object on which you called the function _AND() - the purpose
of this behaviour is usually to allow for function chaining
e.g.
$query ->_AND($innerQuery)->anotherFunction();


On Thu, Sep 16, 2010 at 10:39 AM, Todd Jackson
<[email protected]>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]<nzphpug%[email protected]>




-- 
Mikael Letang
Mobile: 021 027 436 45
Skype: mikael_letang

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to