* Menu class does not depend on ClonOS

This commit is contained in:
Momchil Bozhinov
2021-02-21 19:26:38 +02:00
parent d10a544c4f
commit ac0c401938
6 changed files with 174 additions and 143 deletions

17
php/utils.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
class Utils
{
public static gen_uri_chunks($uri)
{
$uri_chunks = [];
if(!empty($uri)){
$str=str_replace('/index.php','',$uri);
$uri_chunks=explode('/',$str);
}else if(isset($_POST['path'])){
$str=trim($_POST['path'],'/');
$uri_chunks=explode('/',$str);
}
return $uri_chunks;
}
}