duncan3dc\Sonos\Network::createPlaylist PHP Метод

createPlaylist() публичный Метод

Create a new playlist.
public createPlaylist ( $name ) : duncan3dc\Sonos\Playlist
Результат duncan3dc\Sonos\Playlist
    public function createPlaylist($name)
    {
        $controller = $this->getController();
        if ($controller === null) {
            throw new \RuntimeException("No controller found on the current network");
        }
        $data = $controller->soap("AVTransport", "CreateSavedQueue", ["Title" => $name, "EnqueuedURI" => "", "EnqueuedURIMetaData" => ""]);
        $playlist = new Playlist($data["AssignedObjectID"], $controller);
        $this->playlists[] = $playlist;
        return $playlist;
    }