PHP Classes

File: includes/src/vendor/klein/klein/tests/functions-bootstrap.php

Recommend this page to a friend!
  Classes of Subin Siby   Lobby   includes/src/vendor/klein/klein/tests/functions-bootstrap.php   Download  
File: includes/src/vendor/klein/klein/tests/functions-bootstrap.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Lobby
Web OS to install and run Web applications
Author: By
Last change:
Date: 7 years ago
Size: 1,148 bytes
 

Contents

Class file image Download
<?php
/**
 * Klein (klein.php) - A fast & flexible router for PHP
 *
 * @author Chris O'Hara <cohara87@gmail.com>
 * @author Trevor Suarez (Rican7) (contributor and v2 refactorer)
 * @copyright (c) Chris O'Hara
 * @link https://github.com/chriso/klein.php
 * @license MIT
 */

/**
 * Really exploiting some functional/global PHP behaviors here. :P
 */
function implement_custom_fastcgi_function()
{
   
// Check if the function doesn't exist
   
if (!function_exists('fastcgi_finish_request')) {
       
// Let's just define it then
       
function fastcgi_finish_request()
        {
            echo
'fastcgi_finish_request';
        }
    }
}

function
implement_custom_apc_cache_functions()
{
   
// Check if the function doesn't exist
   
if (!function_exists('apc_fetch')) {

        function
apc_fetch($key)
        {
            return
false;
        }

        function
apc_store($key, $value)
        {
            return
false;
        }
    }
}

function
test_num_args_wrapper($args)
{
    echo
func_num_args();
}

function
test_response_edit_wrapper($klein)
{
   
$klein->response()->body('after callbacks!');
}