php method undefined error
<p>I have a Model.class.php and a Bag.class.php, the Bag class extends the Model class.</p>

<p>But when i try to call a function defined in Bag.class.php, it show a fatal error " Call to undefined function fill_entity() in"</p>

<p>bag.class.php :</p>

<pre><code>class Bag extends Model{
 public function __construct($table_name){
    $this-&gt;table_name = $table_name;
 }

 public function fill_entity($row){
     $this-&gt;id = $row['bagID'];
     $this-&gt;name = $row['bagName'];
     $this-&gt;price = $row['bagPrice'];
     $this-&gt;url = $row['bagURL'];
     $this-&gt;img_url = $row['bagImgURL'];
     $this-&gt;mall_id = $row['mallID'];
     $this-&gt;brand_id = $row['brandID'];
 }
</code></pre>

<p>here's my php page where i call this function :</p>

<pre><code>$bag = new Bag($bagtype);
$bag.fill_entity($row);  &lt;---- error on this line.
</code></pre>
