/** * making self object for singleton method * */ public static final function getInstance() { if (!self::$_instance) { self::$_instance = new self(); self::getInstance()->getDocument(); } return self::$_instance; }