Skip to content

Commit

Permalink
Added static instance load
Browse files Browse the repository at this point in the history
  • Loading branch information
eusonlito committed Dec 9, 2015
1 parent 52082f6 commit c3b69cd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Eusonlito/LaravelMeta/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ class Meta
*/
private $processed = [];

/**
* @var object;
*/
private static $instance;

/**
* @param array $config
* @return object
*/
public static function getInstance(array $config = [])
{
return static::$instance ?: (static::$instance = new self($config));
}

/**
* @param array $config
* @return this
Expand Down

0 comments on commit c3b69cd

Please sign in to comment.