PHP Classes

File: exemplo.php

Recommend this page to a friend!
  Classes of Raphael Paez   PHP Collection Example Class   exemplo.php   Download  
File: exemplo.php
Role: Example script
Content type: text/plain
Description: Aulas php
Class: PHP Collection Example Class
Manage a playlist using SplDoublyLinkedList class
Author: By
Last change:
Date: 4 years ago
Size: 477 bytes
 

Contents

Class file image Download
<?php

require 'TocadorDeMusica.php';

$musicas = new SplFixedArray(2);

$musicas[0] = "One Dance";
$musicas[1] = "Closer";

$musicas->setSize(4);

$musicas[2] = "rockstar";
$musicas[3] = "Love Yourself";

$tocador = new TocadorDeMusica();

$tocador->adicionarMusicas($musicas);

$tocador->adicionarMusicaNoComecoDaPlaylist("Havana");

$tocador->removerMusicaDoComecoDaPlaylist();

$tocador->removerMusicaDoFinalDaPlaylist();

$tocador->exibirMusicas();