Ouzo\Routing\Route::any PHP Method

any() public static method

public static any ( $uri, $action, array $options = [] )
$options array
    public static function any($uri, $action, array $options = array())
    {
        self::addRoute(self::$methods, $uri, $action, true, $options);
    }

Usage Example

    /**
     * @test
     */
    public function shouldGenerateUriHelperForAny()
    {
        //given
        Route::any('/users/get_duplicated', 'users#get_duplicated');
        //when
        $generated = UriHelperGenerator::generate()->getGeneratedFunctions();
        //then
        $expected = <<<FUNCT
<?php
function checkParameter(\$parameter)
{
    if (!isset(\$parameter)) {
        throw new \\InvalidArgumentException("Missing parameters");
    }
}

function getDuplicatedUsersPath()
{
    return url("/users/get_duplicated");
}

function allGeneratedUriNames()
{
    return array('getDuplicatedUsersPath');
}
FUNCT;
        $this->assertEquals($expected, $generated);
    }
All Usage Examples Of Ouzo\Routing\Route::any