public function checkOperationality()
    {
        // First check for curl requirements
        parent::checkOperationality();

        $apiKey = $this->getKey();

        if ($apiKey === false) {
            throw new InvalidApiKeyException('Missing API key.');
        }

        if (strlen($apiKey) < 20) {
            throw new InvalidApiKeyException(
                'Key is invalid. Keys are supposed to be 32 characters long - your key is much shorter'
            );
        }

        $keyStatus = self::getKeyStatus($apiKey);
        switch ($keyStatus) {
            case 'great':
                break;
            case 'exceeded':
                throw new ConverterNotOperationalException('quota has exceeded');
                break;
            case 'invalid':
                throw new InvalidApiKeyException('key is invalid');
                break;
        }
    }
public function checkOperationality()
    {
        // First check for curl requirements
        parent::checkOperationality();

        $apiKey = $this->getKey();

        if ($apiKey === false) {
            throw new InvalidApiKeyException('Missing API key.');
        }

        if (strlen($apiKey) < 20) {
            throw new InvalidApiKeyException(
                'Key is invalid. Keys are supposed to be 32 characters long - your key is much shorter'
            );
        }

        $keyStatus = self::getKeyStatus($apiKey);
        switch ($keyStatus) {
            case 'great':
                break;
            case 'exceeded':
                throw new ConverterNotOperationalException('quota has exceeded');
                break;
            case 'invalid':
                throw new InvalidApiKeyException('key is invalid');
                break;
        }
    }
public function checkOperationality ( ) { // First check for curl requirements parent :: checkOperationality ( ) ; $ apiKey = $ this -> getKey ( ) ; if ( $ apiKey === false ) { throw new InvalidApiKeyException ( 'Missing API key.' ) ; } if ( strlen ( $ apiKey ) < 20 ) { throw new InvalidApiKeyException ( 'Key is invalid. Keys are supposed to be 32 characters long - your key is much shorter' ) ; } $ keyStatus = self :: getKeyStatus ( $ apiKey ) ; switch ( $ keyStatus ) { case 'great' : break ; case 'exceeded' : throw new ConverterNotOperationalException ( 'quota has exceeded' ) ; break ; case 'invalid' : throw new InvalidApiKeyException ( 'key is invalid' ) ; break ; } }
Check operationality of Ewww converter.

@throws SystemRequirementsNotMetException  if system requirements are not met (curl)
@throws ConverterNotOperationalException   if key is missing or invalid, or quota has exceeded
Check operationality of Ewww converter .