Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $foo = new Foo();
- $foo->load(52); // Load resource #52
- echo 'The title of resource #52 is ' . $foo->getTitle();
- class Foo extends Model
- {
- private $_id;
- private $_title;
- private $_body;
- public function loadResource($id)
- {
- // ...connect to external SSH server and retrieve resource
- $this->_id = $resource->id;
- $this->_title = $resource->title;
- $this->_body = $resource->body;
- }
- public function getTitle()
- {
- return $this->_title;
- }
- public function getBody()
- {
- return $this->_body;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement