Published in: PHP
Sample which shoows how to compare objects by content.
interface Comparable_Equals { public function equals(self $other); } class User implements Comparable_Equals { public function equals(self $other) { return $this['id'] == $other['id']; } // other methods } $stancell = User::loadByUsername('stancell'); $user = User::loadById(20);
You need to login to post a comment.
