Created
September 19, 2016 13:59
-
-
Save Nikschavan/a5e580e3e0851191d5978369994a1c0b to your computer and use it in GitHub Desktop.
Boilerplate for a PHP class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* CLASS_NAME setup | |
* | |
* @since 1.0 | |
*/ | |
class CLASS_NAME { | |
private static $instance; | |
/** | |
* Initiator | |
*/ | |
public static function instance(){ | |
if ( ! isset( self::$instance ) ) { | |
self::$instance = new CLASS_NAME(); | |
// self::$instance->includes(); | |
// self::$instance->hooks(); | |
} | |
return self::$instance; | |
} | |
} | |
$CLASS_NAME = CLASS_NAME::instance(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very Helpful. Thanks!