first
This commit is contained in:
commit
31a9f8776d
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.idea
|
2
composer.json
Normal file
2
composer.json
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
{
|
||||||
|
}
|
13
index.php
Normal file
13
index.php
Normal 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
28
src/Information.php
Normal 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
19
src/fullName.php
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user