FormClasses/post.php

29 lines
631 B
PHP
Raw Normal View History

2024-07-01 13:09:43 +03:00
<?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();