lastcomments
This commit is contained in:
parent
0596fa6d55
commit
6e62ce7363
@ -4,12 +4,21 @@ namespace src\debug;
|
|||||||
|
|
||||||
class Debug
|
class Debug
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param $content
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function prn($content)
|
public static function prn($content)
|
||||||
{
|
{
|
||||||
echo '<pre style="background: lightgray; border: 1px solid black; padding: 2px">';
|
echo '<pre style="background: lightgray; border: 1px solid black; padding: 2px">';
|
||||||
print_r($content);
|
print_r($content);
|
||||||
echo '</pre>';
|
echo '</pre>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $content
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function dd($content)
|
public static function dd($content)
|
||||||
{
|
{
|
||||||
echo '<pre style="background: lightgray; border: 1px solid black; padding: 2px">';
|
echo '<pre style="background: lightgray; border: 1px solid black; padding: 2px">';
|
||||||
|
@ -11,6 +11,11 @@ class Button
|
|||||||
private string $value;
|
private string $value;
|
||||||
private array $paramsArray;
|
private array $paramsArray;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @param array $paramsArray
|
||||||
|
*/
|
||||||
public function __construct(string $name, string $value, array $paramsArray = [])
|
public function __construct(string $name, string $value, array $paramsArray = [])
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
@ -18,12 +23,21 @@ class Button
|
|||||||
$this->value = $value;
|
$this->value = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function create(): void
|
public function create(): void
|
||||||
{
|
{
|
||||||
$paramsString = $this->createParams($this->paramsArray);
|
$paramsString = $this->createParams($this->paramsArray);
|
||||||
echo "<button name='$this->name' $paramsString>$this->value</button>";
|
echo "<button name='$this->name' $paramsString>$this->value</button>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @param array $paramsArray
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function build(string $name, string $value, array $paramsArray = []): void
|
public static function build(string $name, string $value, array $paramsArray = []): void
|
||||||
{
|
{
|
||||||
$input = new self($name, $value, $paramsArray);
|
$input = new self($name, $value, $paramsArray);
|
||||||
|
@ -12,18 +12,33 @@ class Checkbox
|
|||||||
private string $value;
|
private string $value;
|
||||||
private array $paramsArray;
|
private array $paramsArray;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @param array $paramsArray
|
||||||
|
*/
|
||||||
public function __construct(string $name, string $value, array $paramsArray = [])
|
public function __construct(string $name, string $value, array $paramsArray = [])
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
$this->value = $value;
|
$this->value = $value;
|
||||||
$this->paramsArray = $paramsArray;
|
$this->paramsArray = $paramsArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function create(): void
|
public function create(): void
|
||||||
{
|
{
|
||||||
$paramsString = $this->createParams($this->paramsArray);
|
$paramsString = $this->createParams($this->paramsArray);
|
||||||
echo "<input name='$this->name' type='checkbox' value='$this->value' $paramsString >";
|
echo "<input name='$this->name' type='checkbox' value='$this->value' $paramsString >";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @param array $paramsArray
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function build(string $name, string $value, array $paramsArray): void
|
public static function build(string $name, string $value, array $paramsArray): void
|
||||||
{
|
{
|
||||||
$checkbox = new self($name, $value, $paramsArray);
|
$checkbox = new self($name, $value, $paramsArray);
|
||||||
|
@ -10,12 +10,20 @@ class Label
|
|||||||
private string $title;
|
private string $title;
|
||||||
|
|
||||||
private array $paramsArray;
|
private array $paramsArray;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $title
|
||||||
|
* @param array $paramsArray
|
||||||
|
*/
|
||||||
public function __construct(string $title, array $paramsArray = [])
|
public function __construct(string $title, array $paramsArray = [])
|
||||||
{
|
{
|
||||||
$this->title = $title;
|
$this->title = $title;
|
||||||
$this->paramsArray = $paramsArray;
|
$this->paramsArray = $paramsArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function create(): void
|
public function create(): void
|
||||||
{
|
{
|
||||||
$paramsString = $this->createParams($this->paramsArray);
|
$paramsString = $this->createParams($this->paramsArray);
|
||||||
@ -23,6 +31,11 @@ class Label
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $title
|
||||||
|
* @param array $paramsArray
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function build(string $title, array $paramsArray = [])
|
public static function build(string $title, array $paramsArray = [])
|
||||||
{
|
{
|
||||||
$label = new self($title, $paramsArray);
|
$label = new self($title, $paramsArray);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user