mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-14 03:57:45 +02:00
fix(platforms): add platforms service + reduce memory consumption when rendering platform cards
This commit is contained in:
parent
d4a36f811b
commit
fe73e9fae9
7 changed files with 92 additions and 69 deletions
20
modules/Platforms/Config/Services.php
Normal file
20
modules/Platforms/Config/Services.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Platforms\Config;
|
||||
|
||||
use CodeIgniter\Config\BaseService;
|
||||
use Modules\Platforms\Platforms;
|
||||
|
||||
class Services extends BaseService
|
||||
{
|
||||
public static function platforms(bool $getShared = true): Platforms
|
||||
{
|
||||
if ($getShared) {
|
||||
return self::getSharedInstance('platforms');
|
||||
}
|
||||
|
||||
return new Platforms();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue