Beispiel #1
0
/**
 * Get a component or return the xu instance.
 *
 * @param  string $component
 * @param  mixed  $arguments
 *
 * @return \Xu\Foundation\Foundation
 */
function xu($component = '', $arguments = [])
{
    if (is_string($component) && !empty($component)) {
        return Foundation::get_instance()->component($component, $arguments);
    }
    return Foundation::get_instance();
}
Beispiel #2
0
 /**
  * Call xu functions as a static method.
  *
  * @param string $method
  * @param array $args
  *
  * @return mixed
  */
 public static function __callStatic($method, $args)
 {
     return Foundation::get_instance()->fn($method, $args);
 }