public function getChannels()
    {
        $response = $this->channel->addMessage('query/apps', false);
        $xml = simplexml_load_string($response);
        $channels = array();
        foreach($xml->app as $app){
            $app_id = $app->attributes()->id;
            $channels[(string)$app_id] = array(
                'name' => (string)$app,
                'launch_url' => $this->location.'launch/'.(string)$app_id, //url to post to for launching channel
                'icon_url' => $this->location.'query/icon/'.(string)$app_id, //url containing image src for channel icon
            );
        }
        return $channels;
    }
public function getChannels()
    {
        $response = $this->channel->addMessage('query/apps', false);
        $xml = simplexml_load_string($response);
        $channels = array();
        foreach($xml->app as $app){
            $app_id = $app->attributes()->id;
            $channels[(string)$app_id] = array(
                'name' => (string)$app,
                'launch_url' => $this->location.'launch/'.(string)$app_id, //url to post to for launching channel
                'icon_url' => $this->location.'query/icon/'.(string)$app_id, //url containing image src for channel icon
            );
        }
        return $channels;
    }
public function getChannels ( ) { $ response = $ this -> channel -> addMessage ( 'query/apps' , false ) ; $ xml = simplexml_load_string ( $ response ) ; $ channels = array ( ) ; foreach ( $ xml -> app as $ app ) { $ app_id = $ app -> attributes ( ) -> id ; $ channels [ ( string ) $ app_id ] = array ( 'name' => ( string ) $ app , 'launch_url' => $ this -> location . 'launch/' . ( string ) $ app_id , //url to post to for launching channel 'icon_url' => $ this -> location . 'query/icon/' . ( string ) $ app_id , //url containing image src for channel icon ) ; } return $ channels ; }
to not confuse with communication channels, consider renaming to getApplications
to not confuse with communication channels consider renaming to getApplications