This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/app/Router/Router.php

37 lines
687 B
PHP
Raw Normal View History

2016-09-11 14:25:22 +00:00
<?php
/**
* Holds the a static referencer to Collection.
* @package Sakura
*/
namespace Sakura\Router;
/**
* Collection except static.
* @package Sakura
* @author Julian van de Groep <me@flash.moe>
*/
class Router
{
/**
* Contains the collection.
* @var Collection
*/
protected static $instance = null;
/**
* Does the referencing.
* @param string $method
* @param array $params
* @return mixed
*/
public static function __callStatic($method, $params)
{
if (static::$instance === null) {
static::$instance = new Collection;
}
return static::$instance->$method(...$params);
}
}