Example #1
0
 public function __call($method, $parameters)
 {
     $sentryUserProvider = Sentry::getUserProvider();
     if (method_exists($sentryUserProvider, $method)) {
         return call_user_func_array(array($sentryUserProvider, $method), $parameters);
     }
     return parent::__call($method, $parameters);
 }
Example #2
0
 public function __call($method, $parameters)
 {
     $class_name = class_basename($this);
     #i: Convert array to dot notation
     $config = implode('.', ['relations', $class_name, $method]);
     #i: Relation method resolver
     if (Config::has($config)) {
         $function = Config::get($config);
         return $function($this);
     }
     #i: No relation found, return the call to parent (Eloquent) to handle it.
     return parent::__call($method, $parameters);
 }