public function allowClientIncoming($clientName) {

        // clientName must be a non-zero length alphanumeric string
        if (preg_match('/\W/', $clientName)) {
            throw new \InvalidArgumentException(
                'Only alphanumeric characters allowed in client name.');
        }

        if (strlen($clientName) == 0) {
            throw new \InvalidArgumentException(
                'Client name must not be a zero length string.');
        }

        $this->clientName = $clientName;
        $this->allow('client', 'incoming',
            array('clientName' => $clientName));
    }
public function allowClientIncoming($clientName) {

        // clientName must be a non-zero length alphanumeric string
        if (preg_match('/\W/', $clientName)) {
            throw new \InvalidArgumentException(
                'Only alphanumeric characters allowed in client name.');
        }

        if (strlen($clientName) == 0) {
            throw new \InvalidArgumentException(
                'Client name must not be a zero length string.');
        }

        $this->clientName = $clientName;
        $this->allow('client', 'incoming',
            array('clientName' => $clientName));
    }
public function allowClientIncoming ( $ clientName ) { // clientName must be a non-zero length alphanumeric string if ( preg_match ( '/\W/' , $ clientName ) ) { throw new \ InvalidArgumentException ( 'Only alphanumeric characters allowed in client name.' ) ; } if ( strlen ( $ clientName ) == 0 ) { throw new \ InvalidArgumentException ( 'Client name must not be a zero length string.' ) ; } $ this -> clientName = $ clientName ; $ this -> allow ( 'client' , 'incoming' , array ( 'clientName' => $ clientName ) ) ; }
If the user of this token should be allowed to accept incoming
connections then configure the TwilioCapability through this method and
specify the client name.

@param $clientName
@throws \InvalidArgumentException
If the user of this token should be allowed to accept incoming connections then configure the TwilioCapability through this method and specify the client name .