All pastes #25432 Raw Edit

Miscellany

public php v1 · immutable
#25432 ·published 2005-10-13 22:22 UTC
rendered paste body
public function __cal($method, $argument) {		echo "call to method $method";		$propertyName = "_".strtolower(substr($method,4));		switch (substr($method, 0, 3)) {		case "get":			return $this->$propertyName;			break;		case "set":			$this->$propertyName = $argument[0];			break;		default:			assert(false == "should never reach here! (call to non-existing method on object [$this])");		}	}