Skip to content

Commit

Permalink
=
Browse files Browse the repository at this point in the history
  • Loading branch information
Arikaim committed Dec 18, 2022
1 parent df6fb70 commit 0505174
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Extension/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use Arikaim\Core\Interfaces\ExtensionInterface;
use Arikaim\Core\Interfaces\RoutesInterface;
use Arikaim\Core\Arikaim;
use Arikaim\Core\Db\Model;
use Arikaim\Core\Db\Schema;
use Arikaim\Core\Utils\Factory;
Expand All @@ -22,6 +21,7 @@
use Arikaim\Core\Routes\RouteType;

use Arikaim\Core\System\Error\Traits\TaskErrors;
use Closure;

/**
* Base class for all extensions.
Expand Down Expand Up @@ -469,6 +469,20 @@ public function registerService(string $serviceProvider): bool
return $result;
}

/**
* Run service
*
* @param string $serviceName
* @param Closure $callback
* @return void
*/
public function runService(string $serviceName, Closure $callback)
{
global $container;

return $container->get('service')->with($serviceName,$callback);
}

/**
* UnRegister service provider
*
Expand Down

0 comments on commit 0505174

Please sign in to comment.