/** * instantiate function * @return void * @author Steve Francia <*****@*****.**> */ public static function instantiate() { if (!isset(self::$instance)) { $class = __CLASS__; self::$instance = new $class(); } return self::$instance; }
<?php require 'db/requires.php'; $obj = MongoNemo::instantiate(); printVar($obj); $var = $obj->getWordsTw(); printVar($var);