public function setAuthentication(Authentication $authentication)
    {
        $firstAuthentication = null === $this->authentication;

        $this->authentication = $authentication;

        if ($firstAuthentication && is_resource($this->resource)) {
            $this->authenticate();
        }
    }
public function setAuthentication(Authentication $authentication)
    {
        $firstAuthentication = null === $this->authentication;

        $this->authentication = $authentication;

        if ($firstAuthentication && is_resource($this->resource)) {
            $this->authenticate();
        }
    }
public function setAuthentication ( Authentication $ authentication ) { $ firstAuthentication = null === $ this -> authentication ; $ this -> authentication = $ authentication ; if ( $ firstAuthentication && is_resource ( $ this -> resource ) ) { $ this -> authenticate ( ) ; } }
Defines the authentication. If the

@param  Authentication $authentication
Defines the authentication . If the