29 lines
631 B
PHP
29 lines
631 B
PHP
<?php
|
|
use src\debug\Debug;
|
|
use src\dto\InformationDTO;
|
|
use src\file_db_driver\FileDatabaseDriver;
|
|
use src\models\PostModel;
|
|
use src\Processing;
|
|
|
|
require_once "vendor/autoload.php";
|
|
|
|
ini_set("display_errors", true);
|
|
error_reporting(-1);
|
|
|
|
//$fileName = "Information.txt";
|
|
//$fileModeOpen = "a";
|
|
|
|
$post = new PostModel();
|
|
$post->load($_REQUEST);
|
|
$post->save();
|
|
|
|
$post1 = new PostModel();
|
|
|
|
$res = $post1->find(['author' => ['Stas']])->limit(10)->all();
|
|
|
|
$json = new Processing();
|
|
$infArr = $json->createJsonArray($post->labels(), $res, "form2");
|
|
|
|
$table = new \Itguild\Tables\ListJsonTable($infArr);
|
|
$table->create();
|
|
$table->render(); |