15 lines
No EOL
367 B
PHP
15 lines
No EOL
367 B
PHP
<?php
|
|
|
|
abstract class Fiktiv_Model_Abstract
|
|
{
|
|
|
|
public function __call($name, $args) {
|
|
|
|
// getX methods
|
|
if ('get' == substr($name,0,3)) {
|
|
$property = substr($name, 3);
|
|
$dataPart = '_' . strtolower($property[0]) . substr($property, 1);
|
|
return isset($this->$dataPart) ? $this->$dataPart : false;
|
|
}
|
|
}
|
|
} |