PHP Classes

File: src/SingletonTrait.php

Recommend this page to a friend!
  Classes of Joseluis Laso   Simple Logger   src/SingletonTrait.php   Download  
File: src/SingletonTrait.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Simple Logger
Log messages and view log filtered files
Author: By
Last change: Update of src/SingletonTrait.php
Date: 1 year ago
Size: 230 bytes
 

Contents

Class file image Download
<?php

namespace JLaso\SimpleLogger;

trait
SingletonTrait
{
    protected static
$instance;

    final public static function
getInstance()
    {
        return static::
$instance ? : static::$instance = new static();
    }
   
}