A test of syntax highlighting, and my first post

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.

/**
* 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 and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blogmarks
  • co.mments
  • del.icio.us
  • digg
  • Fark
  • Furl
  • Reddit
  • Spurl
  • TailRank
  • YahooMyWeb

About this entry