35 lines
531 B
PHP
35 lines
531 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Core\Facades;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* NovaCore App Facade
|
||
|
|
* Static access to application services
|
||
|
|
*/
|
||
|
|
class App
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Get service from container
|
||
|
|
*/
|
||
|
|
public static function get(string $name)
|
||
|
|
{
|
||
|
|
return app($name);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Check if service exists
|
||
|
|
*/
|
||
|
|
public static function has(string $name): bool
|
||
|
|
{
|
||
|
|
return app()->has($name);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get all services
|
||
|
|
*/
|
||
|
|
public static function all(): array
|
||
|
|
{
|
||
|
|
return app()->getServices();
|
||
|
|
}
|
||
|
|
}
|