title: What is wrong in this php class
body: <p>I am newbie to the OOP concept of php.I have made a class like this</p>
  
  <pre><code>&lt;?Php
    class ShopProductWriter {
      public function write( $shopProduct ) {
      $str = "{$shopProduct-&gt;title}: " .
              $shopProduct-&gt;getProducer() .
             " ({$shopProduct-&gt;price})\n";
      print $str;
      }
    }
  
    $product1 = new ShopProduct( "My Antonia", "Willa", "Cather", 5.99 );
    $writer = new ShopProductWriter();
    $writer-&gt;write( $product1 );
  ?&gt;
  </code></pre>
  
  <p>Here I am getting the error like <code>Fatal error: Class 'ShopProduct' not found in line 11</code>actually I am doing this example from a tutorial.Can someone tell me where is the wrong part.I have made exact like the tutorial.</p>