public function set($variableName, $value)
    {
        $authorizedSetters = array(
            'clientRef',
            'phoneNumber',
            'codeLength',
            'codeType',
            'caseSensitive',
            'callbackUrl',
            'senderId',
            'messageTemplate'
        );

        if (in_array($variableName, $authorizedSetters)) {
            $name = 'set' . ucfirst($variableName);
            $this->$name($value);
        } else {
            throw new \Exception('No setter for ' . $variableName . '.');
        }

        return $this;
    }
public function set($variableName, $value)
    {
        $authorizedSetters = array(
            'clientRef',
            'phoneNumber',
            'codeLength',
            'codeType',
            'caseSensitive',
            'callbackUrl',
            'senderId',
            'messageTemplate'
        );

        if (in_array($variableName, $authorizedSetters)) {
            $name = 'set' . ucfirst($variableName);
            $this->$name($value);
        } else {
            throw new \Exception('No setter for ' . $variableName . '.');
        }

        return $this;
    }
public function set ( $ variableName , $ value ) { $ authorizedSetters = array ( 'clientRef' , 'phoneNumber' , 'codeLength' , 'codeType' , 'caseSensitive' , 'callbackUrl' , 'senderId' , 'messageTemplate' ) ; if ( in_array ( $ variableName , $ authorizedSetters ) ) { $ name = 'set' . ucfirst ( $ variableName ) ; $ this -> $ name ( $ value ) ; } else { throw new \ Exception ( 'No setter for ' . $ variableName . '.' ) ; } return $ this ; }
Set the available variables in the object.

@param string $variableName name to set.
@param string $value value to set.
@throws \Exception if the variable name is not authorized.
@return object the current instance.
Set the available variables in the object .