title: PHP Singleton extending class
body: <p>I am new to OOP (PHP) and just met the design pattern - <code>singleton</code>. 
  I have found a DB class which uses mysqli (singleton class). I have added some custom methods to it (<code>insert_id()</code>, <code>query()</code>, <code>fetch_result()</code>, etc).</p>
  
  <p>Then I created a new class called <code>UserTools</code> and I want to extend the database class to use the methods I've created previously (<code>query()</code>, <code>fetch_result()</code>, etc).
  But I get this error: </p>
  
  <blockquote>
    <p>Fatal error: Call to private Database::__construct() from invalid context in (...) 
    when I try to create instance of the new class (User Tools).</p>
  </blockquote>
  
  <p>What should I do? Is it a right structure? </p>