public function register($provider)
    {
        // When we receive a string we consider it to be a provider, if not we throw them away!
        if (is_string($provider) && !is_a($provider, '\Vinelab\Minion\Provider', true)) {
            throw new InvalidProviderException(
                sprintf('Provider %s must be an instance of \Vinelab\Minion\Provider', $provider)
            );
        }

        if (!in_array($provider, $this->providers)) {
            $this->providers[] = $provider;
        }
    }
public function register($provider)
    {
        // When we receive a string we consider it to be a provider, if not we throw them away!
        if (is_string($provider) && !is_a($provider, '\Vinelab\Minion\Provider', true)) {
            throw new InvalidProviderException(
                sprintf('Provider %s must be an instance of \Vinelab\Minion\Provider', $provider)
            );
        }

        if (!in_array($provider, $this->providers)) {
            $this->providers[] = $provider;
        }
    }
public function register ( $ provider ) { // When we receive a string we consider it to be a provider, if not we throw them away! if ( is_string ( $ provider ) && ! is_a ( $ provider , '\Vinelab\Minion\Provider' , true ) ) { throw new InvalidProviderException ( sprintf ( 'Provider %s must be an instance of \Vinelab\Minion\Provider' , $ provider ) ) ; } if ( ! in_array ( $ provider , $ this -> providers ) ) { $ this -> providers [ ] = $ provider ; } }
Register the given provider.

@param Closure|string $provider
Register the given provider .