diff --git a/config/function.php b/config/function.php index ba1e11e..50745a0 100644 --- a/config/function.php +++ b/config/function.php @@ -1,6 +1,6 @@ translate($text, $translate_value); } } @@ -151,7 +155,7 @@ function url(string $path): string * @param bool $create if the file does not exist, create it * @return bool */ - function fileExists(string $filename, bool $create): bool + function fileExists(string $filename, bool $create= false): bool { if (! is_file($filename) && !file_exists($filename)){ if ($create) { @@ -165,12 +169,12 @@ function fileExists(string $filename, bool $create): bool if (! function_exists('directoryExists')) { /** - * Validate if the file exists, and in some case create it - * @param string $filename Path to the file or directory. to check files on network shares. - * @param bool $create if the file does not exist, create it + * Validate if the directory exists, and in some case create it + * @param string $filename directory Path to check files on network shares. + * @param bool $create if the directory does not exist, create it * @return bool */ - function directoryExists(string $filename, bool $create): bool + function directoryExists(string $filename, bool $create = false): bool { if (! file_exists($filename)){ if ($create) { @@ -180,4 +184,4 @@ function directoryExists(string $filename, bool $create): bool } return true; } -} \ No newline at end of file +} diff --git a/config/init.php b/config/init.php index b91c51f..b579525 100644 --- a/config/init.php +++ b/config/init.php @@ -56,6 +56,10 @@ function serverDomain(): object * Project General built-in Functions */ require_once $ROOT_DIR . '/config/function.php'; +/** + * + */ +require_once $ROOT_DIR . '/config/tra.php'; /** * Project autoload register diff --git a/config/tra.php b/config/tra.php new file mode 100644 index 0000000..fc0980e --- /dev/null +++ b/config/tra.php @@ -0,0 +1,28 @@ +translate($message, $translate_value); +} + +function tra_js(){} \ No newline at end of file