You keep modifying more information into your post :/
Quote:
|
$this->search->db_tbl = "video"; //what does that mean ?
|
That would set 'this' object's member property 'search''s member property 'db_tbl' to the value of 'video'.
I don't like it since you are directly accessing an object's property. PHP is datatype weak, so I could set db_tbl to new stdclass which would likely break the entire application in use. Always use setters especially in PHP to enforce proper values expected within a member.
Also, a side add, the :: is also used for super scoping. These can be done on parent::, self:: and static::. I think its just the three in PHP.
Edit:
Also, that will work above since there is no explicit reference to $this. It will violate strict standards though.
You should also eliminate the use of global. Its bad enough in procedural code, but in OO it becomes an absolute nightmare. Reserve it purely for work in functions that have set signatures that cannot be modified. Opt to pass in object $Cb instead, which can also be type hinted.