PHP Classes

File: tests/gettext_test.inc.php

Recommend this page to a friend!
  Classes of Joel Gaujard   CodeIgniter GetText   tests/gettext_test.inc.php   Download  
File: tests/gettext_test.inc.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: CodeIgniter GetText
Load locale texts for CodeIgniter applications
Author: By
Last change:
Date: 6 years ago
Size: 661 bytes
 

Contents

Class file image Download
<?php
/**
 * This file is include only for test
 */

// Simulate constants defined in CodeIgniter
defined('APPPATH') || define('APPPATH', __DIR__ . '/');

/**
 * Simulate helper functions
 */

// fake log message function
if (!function_exists('log_message')) {
    function
log_message($level, $message)
    {
        echo
"\n\r" . $level . '|' . $message;
    }
}

// fake get config item function
if (!function_exists('config_item')) {
    function
config_item($key)
    {
       
$config = array(); // initialize an empty array for avoid IDE error
       
require(realpath(__DIR__ . '/../') . '/src/config/gettext.php');
        return
$config[$key];
    }
}