The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled PHP Code
Posted by: julian | February 5, 2011 @ 12:00pm
PHP Code
[
Download
]
<?php abstract class Application_Model_Object_Abstract { protected $_db; protected $_name; public function __construct() { $this->_db = Zend_Db_Table_Abstract::getDefaultAdapter(); } function __call($method, $arguments) { $prefix = strtolower(substr($method, 0, 3)); $property = '_' . strtolower(substr($method, 3)); if (empty($prefix) || empty($property)) { return; } if ($prefix == "get" && isset($this->$property)) { if(isset($this->$property)) { return $this->$property; } } if ($prefix == "set") { $this->$property = $arguments[0]; return; } trigger_error ("Fatal error: Call to undefined method test::$method()"); } }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.61 / 8
54 Votes
http://codebin.yi.org/1093
page generated in 0.00 seconds