admin theme manager
This commit is contained in:
20
kernel/helpers/Manifest.php
Normal file
20
kernel/helpers/Manifest.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\helpers;
|
||||
|
||||
class Manifest
|
||||
{
|
||||
|
||||
public static function getWithVars(string $manifestJson): array
|
||||
{
|
||||
$manifest = json_decode($manifestJson, true);
|
||||
$keys = ["{slug}" => $manifest['slug']];
|
||||
foreach($keys as $key => $value)
|
||||
{
|
||||
$manifestJson = str_replace($key, $value, $manifestJson);
|
||||
}
|
||||
|
||||
return json_decode($manifestJson, true);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user