This repository has been archived on 2023-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
2022-05-08 02:37:00 +08:00

35 lines
616 B
PHP

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Holds the PhpMyAdmin\Di\ServiceItem class
*
* @package PhpMyAdmin\Di
*/
namespace PhpMyAdmin\Di;
/**
* Service manager
*
* @package PhpMyAdmin\Di
*/
class ServiceItem extends ReflectorItem
{
/** @var mixed */
protected $instance;
/**
* Get the instance of the service
*
* @param array $params Parameters
* @return mixed
*/
public function get(array $params = array())
{
if (!isset($this->instance)) {
$this->instance = $this->invoke();
}
return $this->instance;
}
}