Skip to content

Commit

Permalink
MonitoringBackend: just a few comments
Browse files Browse the repository at this point in the history
fixes #7635
  • Loading branch information
Thomas-Gelf committed Nov 11, 2014
1 parent 78fd510 commit 1ca83c0
Showing 1 changed file with 17 additions and 1 deletion.
Expand Up @@ -14,8 +14,10 @@
class MonitoringBackend implements Selectable, Queryable, ConnectionInterface
{
/**
* @var Config
* Backend configuration
*
* @var Config
*/
protected $config;

/**
Expand Down Expand Up @@ -58,6 +60,15 @@ protected function __construct($name, $config)
$this->config = $config;
}

/**
* Get a backend instance
*
* You may ask for a specific backend name or get the default one otherwise
*
* @param string $name Backend name
*
* @return MonitoringBackend
*/
public static function instance($name = null)
{
if (! array_key_exists($name, self::$instances)) {
Expand Down Expand Up @@ -206,6 +217,11 @@ public static function createBackend($name = null)
return self::instance($name);
}

/**
* Get this backend's internal resource
*
* @return mixed
*/
public function getResource()
{
if ($this->resource === null) {
Expand Down

0 comments on commit 1ca83c0

Please sign in to comment.