fix vendor

This commit is contained in:
Kavalar 2024-06-26 11:34:47 +03:00
parent 2714dad7ce
commit 6f66e023a2
18 changed files with 146 additions and 123 deletions

View File

@ -1,4 +1,4 @@
autoincrement=id;last_id=19;table_name=user_info
autoincrement=id;last_id=24;table_name=user_info
id;surname;name;patronymic;dateOfBirth;gender;countryCode;phoneNumber;email;status
3;Билай;Станислав;Романович;2002-03-11;Мужчина;+7;9493761924;stasbilay02@yandex.ru;0
4;Иванова;Мария;Сергеевна;2002-04-05;Женщина;+38;2222222222;sdguhnlnoih@gmail.com;1
@ -17,3 +17,4 @@ id;surname;name;patronymic;dateOfBirth;gender;countryCode;phoneNumber;email;stat
17;Зайцева;Анжела;Игоревна;7777-07-07;Женщина;+7;4444444444;aksjfhfka@mail.ru;0
18;Зайцева;Анжела;Игоревна;7777-07-07;Женщина;+7;4444444444;aksjfhfka@mail.ru;1
19;Зайцева;Анжела;Игоревна;7777-07-07;Женщина;+7;4444444444;aksjfhfka@mail.ru;1
24;ddd;Кирилл;ddd;2024-06-25;Мужчина;+7;9281234567;apuc06@mail.ru;

20
Information2.txt Normal file
View File

@ -0,0 +1,20 @@
autoincrement=id;last_id=20;table_name=user_info
id;surname;name;patronymic;dateOfBirth;gender;countryCode;phoneNumber;email;status
3;Билай;Станислав;Романович;2002-03-11;Мужчина;+7;9493761924;stasbilay02@yandex.ru;0
4;Иванова;Мария;Сергеевна;2002-04-05;Женщина;+38;2222222222;sdguhnlnoih@gmail.com;1
5;Иванов;Иван;Иванович;2002-03-11;Мужчина;+7;1111111111;dsjgbdskgb@yandex.ru;1
6;Плешкова;Анастасия;Денисовна;2006-11-10;Женщина;+7;3333333333;ple.anastasiya@gmail.com;0
7;Зайцева;Анжела;Игоревна;1998-12-12;Женщина;+7;4444444444;aksjfhfka@mail.ru;0
8;Петров;Петр;Петрович;1987-03-02;Мужчина;+7;7777777777;jksghhsdkj@gmail.com;1
9;Зайцев;Федор;Александрович;2014-12-22;Мужчина;+7;6667774441;asert@mail.ru;1
10;Иванов;Петр;Михайлович;2002-03-11;Мужчина;+7;1111111111;asert@mail.ru;1
11;Иванов;Роман;Сергеевич;2002-03-11;Мужчина;+7;1111111111;ple.anastasiya@gmail.com;0
12;Билай;Станислав;Романович;4444-04-04;Мужчина;+7;9493761924;stasbilay02@yandex.ru;0
13;Билай;Станислав;Романович;4444-04-04;Мужчина;+7;9493761924;stasbilay02@yandex.ru;1
14;Билай;Станислав;Романович;4444-04-04;Мужчина;+7;9493761924;stasbilay02@yandex.ru;0
15;Билай;Станислав;Романович;4444-04-04;Мужчина;+7;9493761924;stasbilay02@yandex.ru;0
16;Билай;Станислав;Романович;4444-04-04;Женщина;+38;9493761924;stasbilay02@yandex.ru;0
17;Зайцева;Анжела;Игоревна;7777-07-07;Женщина;+7;4444444444;aksjfhfka@mail.ru;0
18;Зайцева;Анжела;Игоревна;7777-07-07;Женщина;+7;4444444444;aksjfhfka@mail.ru;1
19;Зайцева;Анжела;Игоревна;7777-07-07;Женщина;+7;4444444444;aksjfhfka@mail.ru;1
20;ddd;Кирилл;ddd;2024-06-25;Мужчина;+7;9281234567;apuc06@mail.ru;

View File

@ -3,15 +3,15 @@
namespace src;
use src\debug\Debug;
use src\dto\InformationDTO;
use src\file_db_driver\FileDatabaseDriver;
use src\Information;
require_once "vendor/autoload.php";
//$fileName = "Information.txt";
//$fileModeOpen = "a";
$fullInformation = new Information();
$fullInformation = new InformationDTO();
$fullInformation->load($_REQUEST);
$string = $fullInformation->toString();

View File

@ -1,7 +1,6 @@
<?php
use src\debug\Debug;
use src\Information;
use src\dto\InformationDTO;
use src\Processing;
require_once "vendor/autoload.php";
@ -24,7 +23,7 @@ $rep->close();
$infArr = [];
foreach ($res as $key){
$inf = new Information();
$inf = new InformationDTO();
$inf->load($key);
$infArr[] = $inf;
}

View File

@ -1,8 +1,6 @@
<?php
namespace src;
use src\dto\BaseDTO;
namespace src\dto;
/**
* @property int $id
@ -15,7 +13,7 @@ use src\dto\BaseDTO;
* @property string $phoneNumber
* @property string $email
*/
class Information extends BaseDTO
class InformationDTO extends BaseDTO
{
public int $id;
public string $surname;

40
src/models/BaseModel.php Normal file
View File

@ -0,0 +1,40 @@
<?php
namespace src\models;
use src\file_db_driver\FileDatabaseDriver;
class BaseModel
{
protected FileDatabaseDriver $fdd;
public int $id;
public function __construct()
{
$this->fdd = new FileDatabaseDriver();
$this->fdd->connect($this->file());
}
/**
* @return array
*/
public function fillable(): array
{
return [];
}
/**
* @return string
*/
public function file(): string
{
return "";
}
public function save()
{
}
}

18
vendor/autoload.php vendored
View File

@ -2,6 +2,24 @@
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit5983c395e598dae0283c3b233c3f9cc1::getLoader();

View File

@ -42,6 +42,9 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var ?string */
private $vendorDir;
@ -106,6 +109,7 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
@ -425,7 +429,8 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
@ -555,18 +560,26 @@ class ClassLoader
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}

View File

@ -21,12 +21,14 @@ use Composer\Semver\VersionParser;
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
@ -37,7 +39,7 @@ class InstalledVersions
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
@ -96,7 +98,7 @@ class InstalledVersions
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
@ -117,7 +119,7 @@ class InstalledVersions
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
@ -241,7 +243,7 @@ class InstalledVersions
/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
@ -255,7 +257,7 @@ class InstalledVersions
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@ -278,7 +280,7 @@ class InstalledVersions
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
@ -301,7 +303,7 @@ class InstalledVersions
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
@ -311,7 +313,7 @@ class InstalledVersions
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
@ -326,7 +328,9 @@ class InstalledVersions
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
@ -338,12 +342,17 @@ class InstalledVersions
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;
if (self::$installed !== array()) {
$installed[] = self::$installed;
}
return $installed;
}

View File

@ -1,3 +1,4 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
@ -17,3 +18,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -2,20 +2,9 @@
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Itguild\\Tables\\ListJsonTable' => $vendorDir . '/itguild/tables/src/ListJsonTable.php',
'Itguild\\Tables\\Pagination' => $vendorDir . '/itguild/tables/src/Pagination.php',
'Itguild\\Tables\\ViewJsonTable' => $vendorDir . '/itguild/tables/src/ViewJsonTable.php',
'Itguild\\Tables\\actionBtn\\ActionBtn' => $vendorDir . '/itguild/tables/src/actionBtn/ActionBtn.php',
'Itguild\\Tables\\actionBtn\\ToDeleteBtn' => $vendorDir . '/itguild/tables/src/actionBtn/ToDeleteBtn.php',
'Itguild\\Tables\\actionBtn\\ToEditBtn' => $vendorDir . '/itguild/tables/src/actionBtn/ToEditBtn.php',
'Itguild\\Tables\\actionBtn\\ToListBtn' => $vendorDir . '/itguild/tables/src/actionBtn/ToListBtn.php',
'Itguild\\Tables\\traits\\CreateOption' => $vendorDir . '/itguild/tables/src/traits/CreateOption.php',
'Itguild\\Tables\\traits\\CreateParams' => $vendorDir . '/itguild/tables/src/traits/CreateParams.php',
'src\\debug\\Debug' => $baseDir . '/src/debug/Debug.php',
'src\\file_db_driver\\FileDatabaseDriver' => $baseDir . '/src/file_db_driver/FileDatabaseDriver.php',
);

View File

@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(

View File

@ -2,7 +2,7 @@
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(

View File

@ -23,30 +23,11 @@ class ComposerAutoloaderInit5983c395e598dae0283c3b233c3f9cc1
}
spl_autoload_register(array('ComposerAutoloaderInit5983c395e598dae0283c3b233c3f9cc1', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit5983c395e598dae0283c3b233c3f9cc1', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit5983c395e598dae0283c3b233c3f9cc1::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit5983c395e598dae0283c3b233c3f9cc1::getInitializer($loader));
$loader->register(true);

View File

@ -30,17 +30,6 @@ class ComposerStaticInit5983c395e598dae0283c3b233c3f9cc1
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Itguild\\Tables\\ListJsonTable' => __DIR__ . '/..' . '/itguild/tables/src/ListJsonTable.php',
'Itguild\\Tables\\Pagination' => __DIR__ . '/..' . '/itguild/tables/src/Pagination.php',
'Itguild\\Tables\\ViewJsonTable' => __DIR__ . '/..' . '/itguild/tables/src/ViewJsonTable.php',
'Itguild\\Tables\\actionBtn\\ActionBtn' => __DIR__ . '/..' . '/itguild/tables/src/actionBtn/ActionBtn.php',
'Itguild\\Tables\\actionBtn\\ToDeleteBtn' => __DIR__ . '/..' . '/itguild/tables/src/actionBtn/ToDeleteBtn.php',
'Itguild\\Tables\\actionBtn\\ToEditBtn' => __DIR__ . '/..' . '/itguild/tables/src/actionBtn/ToEditBtn.php',
'Itguild\\Tables\\actionBtn\\ToListBtn' => __DIR__ . '/..' . '/itguild/tables/src/actionBtn/ToListBtn.php',
'Itguild\\Tables\\traits\\CreateOption' => __DIR__ . '/..' . '/itguild/tables/src/traits/CreateOption.php',
'Itguild\\Tables\\traits\\CreateParams' => __DIR__ . '/..' . '/itguild/tables/src/traits/CreateParams.php',
'src\\debug\\Debug' => __DIR__ . '/../..' . '/src/debug/Debug.php',
'src\\file_db_driver\\FileDatabaseDriver' => __DIR__ . '/../..' . '/src/file_db_driver/FileDatabaseDriver.php',
);
public static function getInitializer(ClassLoader $loader)

View File

@ -1,35 +0,0 @@
{
"packages": [
{
"name": "itguild/tables",
"version": "0.1",
"version_normalized": "0.1.0.0",
"source": {
"type": "git",
"url": "https://git.itguild.info/ItGuild/tables",
"reference": "42ab26a3db1cef8319985fc3a0f5d23d2dff4e3b"
},
"time": "2024-05-27T09:59:44+00:00",
"type": "library",
"installation-source": "source",
"autoload": {
"psr-4": {
"Itguild\\Tables\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kavalar",
"email": "apuc06@mail.ru"
}
],
"install-path": "../itguild/tables"
}
],
"dev": true,
"dev-package-names": []
}

View File

@ -1,31 +1,31 @@
<?php return array(
'root' => array(
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '2714dad7cea767e4d3f2133bef559e30bb581ca5',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '5468b1d2860f8173bf9ab0050803fb54beff40ed',
'name' => '__root__',
'dev' => true,
),
'versions' => array(
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '2714dad7cea767e4d3f2133bef559e30bb581ca5',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '5468b1d2860f8173bf9ab0050803fb54beff40ed',
'dev_requirement' => false,
),
'itguild/tables' => array(
'pretty_version' => '0.1',
'version' => '0.1.0.0',
'reference' => '42ab26a3db1cef8319985fc3a0f5d23d2dff4e3b',
'type' => 'library',
'install_path' => __DIR__ . '/../itguild/tables',
'aliases' => array(),
'reference' => '42ab26a3db1cef8319985fc3a0f5d23d2dff4e3b',
'dev_requirement' => false,
),
),

@ -1 +0,0 @@
Subproject commit 42ab26a3db1cef8319985fc3a0f5d23d2dff4e3b