<?php


namespace CMSMSExt\core;


trait TMagicCall
{
  public function __call($name, $arguments)
  {
    if( !\startswith($name,  '_') && \method_exists(\get_called_class(), $name) )
    {
      return \call_user_func_array([\get_called_class(), $name], $arguments);
    }
    
    throw new \BadMethodCallException(\get_called_class() . '->' . $name);
  }
}

?>