CodeBuilder
-
Posts
1 -
Joined
-
Last visited
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
PHP "internal" access modifier
in Miscellaneous
Posted
i think you can use "final" for that...
class base{
public function setParam($key, $callable){
$this->params[$key] = $callable;
}
final function run(){
foreach($this->params as $key=>$callable)
$callable();
}
}
If you use like this then you cannot modify this method in any derived classes..