Exemplo n.º 1
0
function pass($route)
{
    Frank::set_request($route);
    Frank::run(array('pass' => true));
}
Exemplo n.º 2
0
 /**
  * Gets the output from a url
  *
  * @param 	string	$url	 path (in Frank) to get the data for
  * @param	array	$options set of options to pass to Frank::exec()
  * @param	string	$method  type of request to the server (i.e. get, post, put, delete)
  * @return 	string			 data the function outputs
  */
 private function get_data($url, $options = array(), $method = 'get')
 {
     Frank::set_request($url);
     Frank::set_method($method);
     Frank::set_run(true);
     Frank::set_status(array(200, array(), false));
     $output = Frank::call($options);
     foreach (Frank::middleware() as $middleware) {
         if (gettype($middleware) == 'string') {
             $middleware = new $middleware();
         }
         $output = $middleware->call($output);
     }
     return $output[2];
 }