src/Pushman.php
public function destroyChannel($channel)
    {
        $channels = $this->validateChannel($channel);

        $arrayOfChannels = json_decode($channels, true);
        if (in_array('public', $arrayOfChannels)) {
            throw new InvalidDeleteRequestException('You cannot delete the public channel.');
        }

        $url = $this->getURL('channel');

        $headers = [
            'body' => [
                'private' => $this->privateKey,
                'channel' => $channels
            ]
        ];

        $response = $this->processRequest($url, $headers, 'delete');

        return $response;
    }
public function destroyChannel($channel)
    {
        $channels = $this->validateChannel($channel);

        $arrayOfChannels = json_decode($channels, true);
        if (in_array('public', $arrayOfChannels)) {
            throw new InvalidDeleteRequestException('You cannot delete the public channel.');
        }

        $url = $this->getURL('channel');

        $headers = [
            'body' => [
                'private' => $this->privateKey,
                'channel' => $channels
            ]
        ];

        $response = $this->processRequest($url, $headers, 'delete');

        return $response;
    }
public function destroyChannel ( $ channel ) { $ channels = $ this -> validateChannel ( $ channel ) ; $ arrayOfChannels = json_decode ( $ channels , true ) ; if ( in_array ( 'public' , $ arrayOfChannels ) ) { throw new InvalidDeleteRequestException ( 'You cannot delete the public channel.' ) ; } $ url = $ this -> getURL ( 'channel' ) ; $ headers = [ 'body' => [ 'private' => $ this -> privateKey , 'channel' => $ channels ] ] ; $ response = $ this -> processRequest ( $ url , $ headers , 'delete' ) ; return $ response ; }
Destroy a channel or set of channels.

@param $channel
@return string
@throws InvalidChannelException
@throws InvalidDeleteRequestException
Destroy a channel or set of channels .