Date in orientation to PHP objects?

0

I'm starting to learn Object Orientation, I would like to know how to use date with php , because in Java you can import java util , but in php I do not know how I do, I'll show my code: / p>

<?php

abstract class DadosPessoais {
protected $nome, $funcao, $rg, $cpf, $data_adm, $login, $senha;


abstract function logar();  



function getNome() {
    return $this->nome;
}

function getFuncao() {
    return $this->funcao;
}

function getRg() {
    return $this->rg;
}

function getCpf() {
    return $this->cpf;
}

function getData_adm() {
    return $this->data_adm;
}

function getLogin() {
    return $this->login;
}

function getSenha() {
    return $this->senha;
}

function setNome($nome) {
    $this->nome = $nome;
}

function setFuncao($funcao) {
    $this->funcao = $funcao;
}

function setRg($rg) {
    $this->rg = $rg;
}

function setCpf($cpf) {
    $this->cpf = $cpf;
}

function setData_adm($data_adm) {
    $this->data_adm = new DateTime($data_adm);        
}

function setLogin($login) {
    $this->login = $login;
}

function setSenha($senha) {
    $this->senha = $senha;
}
}
    
asked by anonymous 21.11.2017 / 19:39

0 answers