This commit is contained in:
Билай Станислав 2024-05-17 16:07:25 +03:00
commit 31a9f8776d
5 changed files with 63 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea

2
composer.json Normal file
View File

@ -0,0 +1,2 @@
{
}

13
index.php Normal file
View File

@ -0,0 +1,13 @@
<?php
use src\fullName;
use src\Information;
//require_once "src/form.html";
require_once "src/Information.php";
require_once "src/fullName.php";
$fullName = new fullName('Билай', 'Станислав', 'Романович');
$fn = $fullName->foolName();
$p1 = new Information($fn, 'hfd', '11', '+7', '11111111', 'ashg@ajhi');
$p1->writeInformation();

28
src/Information.php Normal file
View File

@ -0,0 +1,28 @@
<?php
namespace src;
class Information
{
public $foolName;
public $gender;
public $DateOfBirthday;
public $countryCode;
public $phoneNumber;
public $email;
public function __construct($foolName, $gender, $DateOfBirthday, $countryCode, $phoneNumber, $email)
{
$this->foolName = $foolName;
$this->gender = $gender;
$this->DateOfBirthday = $DateOfBirthday;
$this->countryCode = $countryCode;
$this->phoneNumber = $phoneNumber;
$this->email = $email;
}
public function writeInformation()
{
echo $this->foolName . ";" . $this->gender . ";" . $this->DateOfBirthday . ";" . $this->countryCode . $this->phoneNumber . ";" . $this->email . ";";
}
}

19
src/fullName.php Normal file
View File

@ -0,0 +1,19 @@
<?php
namespace src;
class fullName
{
public $surname;
public $name;
public $patronymic;
public function __construct($surname, $name, $patronymic)
{
$this->name = $surname . " " . $name . " " . $patronymic;
}
public function foolName()
{
return $this->name;
}
}