I know how to chain class methods (with the \"return $this\" and all), but what i am trying to do is to chain them in a smart way, have a look at this:
$albu
This takes a really elegant solution.
Instead of reinventing the wheel, look into an existing framework(s).
I suggest Laravel using the Eloquent ORM. You'll be able to do this and MUCH more.