/** * Gets the instance of the Security class. * * @param callable| Closure $callback * @return object Instance of Security */ protected function create(Closure $callback = null) { if (self::$instance === null) { self::$instance = new self(); } if ($callback instanceof Closure) { return $callback(self::$instance); } return self::$instance; }