No Gravatar

Well this is my first post here, and I thought that it would be good to try out the syntax highlighting plugin I have installed.

Here it is then….enjoy!


/**
* getInstance
*
* This method returns DB instance or creates an intitial connection
*
* @author Chris Ramsay
* @param void
* @return self::$instance  static instance of db connection
*
*/
public static function getInstance() {

if (!self::$instance) {

self::loadConnectionParams();
self::$instance = new PDO(self::$type . ':host=' . self::$host . ';dbname=' . self::$dsn, self::$user, self::$pass);
self::$instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

}

return self::$instance;

}
  • Share/Bookmark

No Comments on “A test of syntax highlighting, and my first post”

You can track this conversation through its atom feed.

No one has commented on this entry yet.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>