2 Commits
3.6.0 ... 3.7.0

7 changed files with 8 additions and 71 deletions

View File

@@ -6,8 +6,10 @@ namespace ${REPO_OWNER}\${REPO_NAME}\controllers;
// Files of the project
use ${REPO_OWNER}\${REPO_NAME}\views\templater,
${REPO_OWNER}\${REPO_NAME}\models\core as models,
${REPO_OWNER}\${REPO_NAME}\models\enumerations\language;
${REPO_OWNER}\${REPO_NAME}\models\core as models;
// Library for languages support
use mirzaev\languages\language;
// Framework for PHP
use mirzaev\minimal\core as minimal,
@@ -28,7 +30,6 @@ use mirzaev\minimal\core as minimal,
*
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
* @author ${REPO_OWNER} <mail@domain.zone>
*/
class core extends controller
{

View File

@@ -22,7 +22,6 @@ use mirzaev\minimal\http\enumerations\content,
*
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
* @author ${REPO_OWNER} <mail@domain.zone>
*/
final class index extends core
{

View File

@@ -20,7 +20,6 @@ use exception;
*
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
* @author ${REPO_OWNER} <mail@domain.zone>
*/
class core extends model
{

View File

@@ -1,62 +0,0 @@
<?php
declare(strict_types=1);
namespace ${REPO_OWNER}\${REPO_NAME}\models\enumerations;
/**
* Language
*
* Types of languages by ISO 639-1 standart
*
* @package ${REPO_OWNER}\${REPO_NAME}\models\enumerations
*
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
* @author ${REPO_OWNER} <mail@domain.zone>
*/
enum language
{
case en;
case ru;
/**
* Label
*
* Initialize label of the language
*
* @param language|null $language Language into which to translate
*
* @return string Translated label of the language
*/
public function label(?language $$language = language::en): string
{
// Exit (success)
return match ($$this) {
language::en => match ($$language) {
language::en => 'English',
language::ru => 'Английский'
},
language::ru => match ($$language) {
language::en => 'Russian',
language::ru => 'Русский'
}
};
}
/**
* Flag
*
* Initialize the flag emoji of the language
*
* @return string The flag emoji of the language
*/
public function flag(): string
{
// Exit (success)
return match ($$this) {
language::en => '🇺🇸',
language::ru => '🇷🇺'
};
}
}

View File

@@ -18,7 +18,6 @@ use exception;
*
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
* @author ${REPO_OWNER} <mail@domain.zone>
*/
trait files
{

View File

@@ -4,8 +4,8 @@ declare(strict_types=1);
namespace ${REPO_OWNER}\${REPO_NAME}\views;
// Files of the project
use ${REPO_OWNER}\${REPO_NAME}\models\enumerations\language;
// Library for languages support
use mirzaev\languages\language;
// Framework for PHP
use mirzaev\minimal\controller;
@@ -34,7 +34,6 @@ use ArrayAccess as array_access,
*
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
* @author ${REPO_OWNER} <mail@domain.zone>
*/
final class templater extends controller implements array_access
{

View File

@@ -25,6 +25,8 @@
"php": "^8.4",
"mirzaev/minimal": "^3.7",
"mirzaev/baza": "^3.3",
"mirzaev/languages": "^1",
"mirzaev/currencies": "^1",
"twig/twig": "^3.2",
"twig/extra-bundle": "^3.7",
"twig/intl-extra": "^3.10"