public function setProvider($provider = null)
    {
        $this->provider = null;

        if (null === ($provider = $this->internalResolveProvider($provider))) {
            $this->provider = $this->providerId = null;
        } else {
            $this->providerId = $provider->id;
            $this->provider = $provider;
        }

        return $this;
    }
public function setProvider($provider = null)
    {
        $this->provider = null;

        if (null === ($provider = $this->internalResolveProvider($provider))) {
            $this->provider = $this->providerId = null;
        } else {
            $this->providerId = $provider->id;
            $this->provider = $provider;
        }

        return $this;
    }
public function setProvider ( $ provider = null ) { $ this -> provider = null ; if ( null === ( $ provider = $ this -> internalResolveProvider ( $ provider ) ) ) { $ this -> provider = $ this -> providerId = null ; } else { $ this -> providerId = $ provider -> id ; $ this -> provider = $ provider ; } return $ this ; }
Associate a provider

@param mixed $provider
@return $this
Associate a provider