Skip to content

Instantly share code, notes, and snippets.

@monsat
Created August 22, 2011 03:15
Show Gist options
  • Save monsat/1161580 to your computer and use it in GitHub Desktop.
Save monsat/1161580 to your computer and use it in GitHub Desktop.
test of protected method
<?php
// insert this class and
// $this->Sample = new SampleExposed();
class SampleExposed extends Sample {
public function __call($method, array $args = array()) {
if (!method_exists($this, $method))
throw new BadMethodCallException("method '$method' does not exist");
return call_user_func_array(array($this, $method), $args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment