<?php

namespace App\Core;

class LibraryLoader
{

public static function load(
string $name
): bool
{

$config=

require
BASE_PATH
.
'/config/app.php';

$libs=

$config[
'libs'
]

??

[];

foreach(

$libs[
$name
]

??

[]

as $path
){

if(
file_exists(
$path
)
){

require_once
$path;

return true;

}

}

return false;

}

}
