Optional abstract method
<p>I currently have an abstract class which i am extending to other controllers. I have a abstract function within the abstract class which takes the value and places it in the <code>__construct</code>.</p>

<pre><code>abstract class Controller extends BaseController {
    abstract public function something();

    public function __construct(Request $request) {
        if (!is_null($this-&gt;something())){
            $this-&gt;global_constructor_usse = $this-&gt;something();
        }
    }
}
</code></pre>

<p>My problem is that on controllers that dont require this abstract function, i am having to place in the empty function. </p>

<pre><code>class ControllerExample extends Controller {
  public function something(){
      return 'somethinghere';
  }
}
</code></pre>

<p>Is there anyway to making the abstract function optional or have a default value?</p>

<pre><code>class EmptyControllerExample extends Controller {
  public function something(){}
}
</code></pre>

<p>Or what would be the best method of going about this?</p>