/usr/share/php/kohana3.1/system/tests/test_data/callback_routes.php is in libkohana3.1-core-php 3.1.5-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | <?php
/**
* A holding class for route callback tests
*
* @group kohana
*
* @package Unittest
* @author Kohana Team
* @copyright (c) 2008-2012 Kohana Team
* @license http://kohanaframework.org/license
*/
class Route_Holder
{
/**
* Just an empty callback that doesn't match anything
*/
public static function default_callback($uri)
{
}
/**
* Just an empty callback that matches everything
*
* @return array
*/
public static function default_return_callback($uri)
{
return array(
);
}
/**
* Route callback for test_matches_returns_array_of_parameters_on_successful_match
*
* @return array
*/
public static function matches_returns_array_of_parameters_on_successful_match($uri)
{
return array(
'controller' => 'welcome',
'action' => 'index',
);
}
/**
* Route callback for test_required_parameters_are_needed
*
* @return array
*/
public static function required_parameters_are_needed($uri)
{
if (substr($uri, 0, 5) == 'admin')
{
return array(
'controller' => 'foo',
'action' => 'bar',
);
}
}
/**
* Route callback for test reverse_routing_returns_routes_uri_if_route_is_static
*
* @return array
*/
public static function reverse_routing_returns_routes_uri_if_route_is_static($uri)
{
if ($uri == 'info/about_us')
{
return array(
);
}
}
}
|