hercioneto

PW1 2019 - Editoras.class.php

Oct 29th, 2019
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <?php
  2. class Editoras{
  3.     private $codigo;
  4.     private $editora;
  5.     private $editoras = array("Editora Senac São Paulo", "Elsevier", "Illuminare", "Panda Books","Editora Record", "Cortez Editora","Pearson","MacronBooks");
  6.  
  7.     public function getCodigo(){
  8.         return $this->codigo;
  9.     }
  10.  
  11.     public function setCodigo($codigo){
  12.         $this->codigo = $codigo;
  13.     }
  14.  
  15.     public function getEditora(){
  16.         return $this->editora;
  17.     }
  18.  
  19.     public function setEditora($editora){
  20.         $this->editora = $editora;
  21.     }
  22.  
  23.     public function listarEditora(){
  24.         $n = $this->editoras[$this->codigo];
  25.         return $n;
  26.     }
  27.  
  28.     public function listarEditoras(){
  29.         return $this->editoras;
  30.     }
  31. }
  32.  
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment