for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace kalanis\kw_storage\Access;
use kalanis\kw_storage\Interfaces;
/**
* Class FactoryInstances
* @package kalanis\kw_storage\Access
* Factory instances for getting each wanted storage
*/
class FactoryInstances
{
/** @var FactoryInstances|null */
protected static $instance = null;
/** @var Factory */
protected $factory = null;
public static function init(?Interfaces\IStTranslations $lang = null): void
static::$instance = new self($lang);
}
public static function getInstance(): Factory
if (empty(static::$instance)) {
static::$instance = new self();
return static::$instance->factory;
protected function __construct(?Interfaces\IStTranslations $lang = null)
$this->factory = new Factory($lang);
* @codeCoverageIgnore singleton
private function __clone()
// cannot run