<?php
class myCustomThing {
private $dt;
public function __construct($date=NULL) {
$this->dt = new DateTime($date);
}
public function __call($methodName, $args) {
if (! method_exists($this, $methodName)) {
return call_user_func_array([$this->dt, $methodName], $args);
}
}
}
$a = new myCustomThing('now');
echo $a->format('c');