first commit
This commit is contained in:
21
bundles/KupShop/KupShopBundle/Util/ServiceTrait.php
Normal file
21
bundles/KupShop/KupShopBundle/Util/ServiceTrait.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace KupShop\KupShopBundle\Util;
|
||||
|
||||
trait ServiceTrait
|
||||
{
|
||||
// Temporary without symfony
|
||||
private static $service;
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public static function getService()
|
||||
{
|
||||
if (!static::$service) {
|
||||
static::$service = new static();
|
||||
}
|
||||
|
||||
return static::$service;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user