Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
fiktivkod/library/Fiktiv/Model/Abstract.php
2010-10-02 00:34:20 +02:00

26 lines
No EOL
565 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;
}
}
public function __get($name) {
$name = '_'.$name;
if (isset($this->$name))
return $this->$name;
}
abstract public function setAttribs(array $data);
}