public function setChannel(array $channel)
    {
        foreach ($channel as $element => $value) {
            $setter = 'set' . ucfirst($element);

            if (method_exists($this, $setter)) {
                $this->$setter($value);
                unset($channel[$element]);
            }
        }

        $this->channel = $channel;

        return $this;
    }
public function setChannel(array $channel)
    {
        foreach ($channel as $element => $value) {
            $setter = 'set' . ucfirst($element);

            if (method_exists($this, $setter)) {
                $this->$setter($value);
                unset($channel[$element]);
            }
        }

        $this->channel = $channel;

        return $this;
    }
public function setChannel ( array $ channel ) { foreach ( $ channel as $ element => $ value ) { $ setter = 'set' . ucfirst ( $ element ) ; if ( method_exists ( $ this , $ setter ) ) { $ this -> $ setter ( $ value ) ; unset ( $ channel [ $ element ] ) ; } } $ this -> channel = $ channel ; return $ this ; }
Sets channel elements.

May contain any custom elements.

@param array $channel

@return Feed
Sets channel elements .