Objects in the model layer: Part 2
I previously talked about the terms I use for objects in the model layer and now it's time to put some code on those bones. Note that,as always, all code here is example code and not production-ready. An entity My entities are plain old PHP objects: namespace Book; class Entity { protected $id; protected $author; protected $title; protected $isbn; public function __construct($data = array()) { $this->populate($data); } // Data transfer methods public function populate($data) {… continue reading.


