fifth
This commit is contained in:
38
info.php
38
info.php
@ -2,40 +2,22 @@
|
||||
|
||||
namespace src;
|
||||
|
||||
use AdditionallyInfo;
|
||||
use Contacts;
|
||||
use FullName;
|
||||
use Information;
|
||||
|
||||
require_once "src/Information.php";
|
||||
require_once "src/FullName.php";
|
||||
require_once "src/Contacts.php";
|
||||
require_once "src/AdditionallyInfo.php";
|
||||
|
||||
$surname = $_REQUEST["surname"];
|
||||
$name = $_REQUEST["name"];
|
||||
$patronymic = $_REQUEST["patronymic"];
|
||||
$fileName = "Information.txt";
|
||||
$fileModeOpen = "a";
|
||||
|
||||
$fullName = new FullName($surname, $name, $patronymic);
|
||||
$fullName = $fullName->getFoolName();
|
||||
$fullInformation = new Information();
|
||||
$fullInformation->load($_REQUEST);
|
||||
|
||||
$gender = $_REQUEST["gender"];
|
||||
$dateOfBirth = $_REQUEST["dateOfBirth"];
|
||||
echo "<pre>";
|
||||
print_r($fullInformation);
|
||||
$string = $fullInformation->toString();
|
||||
|
||||
$additionallyInfo = new AdditionallyInfo($dateOfBirth, $gender);
|
||||
$additionallyInfo = $additionallyInfo->getAdditionallyInfo();
|
||||
|
||||
$countryCode = $_REQUEST["countryCode"];
|
||||
$phoneNumber = $_REQUEST["phoneNumber"];
|
||||
$email = $_REQUEST["email"];
|
||||
|
||||
$contacts = new Contacts($countryCode, $phoneNumber, $email);
|
||||
$contacts = $contacts->getContacts();
|
||||
|
||||
$fullInformation = new Information($fullName, $additionallyInfo, $contacts);
|
||||
$fullInformation = $fullInformation->getFullInformation();
|
||||
|
||||
$file = fopen("Information.txt", "a");
|
||||
fwrite($file, $fullInformation);
|
||||
$file = fopen($fileName, $fileModeOpen);
|
||||
fwrite($file, $string);
|
||||
fclose($file);
|
||||
|
||||
require "table.php";
|
Reference in New Issue
Block a user