This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit | |
colors="true" | |
> | |
<testsuites> | |
<testsuite name="CITools Test Suite"> | |
<directory>./tests/</directory> | |
</testsuite> | |
</testsuites> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "The CodeIgniter framework", | |
"name": "codeigniter/framework", | |
"type": "project", | |
"homepage": "https://codeigniter.com", | |
"license": "MIT", | |
"support": { | |
"forum": "http://forum.codeigniter.com/", | |
"wiki": "https://github.com/bcit-ci/CodeIgniter/wiki", | |
"irc": "irc://irc.freenode.net/codeigniter", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
//define o hook que será executado após a execução do método __construct | |
//de cada controller, para que o controle do idioma seja feito de maneira | |
//automática | |
$hook['post_controller_constructor'] = array( | |
'class' => 'LanguageLoader', //define a classe | |
'function' => 'initialize', //define o método a ser executado | |
'filename' => 'LanguageLoader.php', //define o nome do arquivo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Classe responsável por verificar qual o idioma está sendo utilizado e carregar | |
* os respectivos arquivos no diretório 'application/language' | |
* | |
*/ | |
class LanguageLoader | |
{ | |
/** | |
* Método que faz o carregamento dos arquivos de idiomas conforme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
?><!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<!-- Substituído o título estático pela chamada à linha correspondente no arquivo de idioma --> | |
<title><?=$this->lang->line('welcome_title')?></title> | |
<style type="text/css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Welcome extends CI_Controller { | |
public function __construct() { | |
parent::__construct(); | |
//carrega o helper URL para que seja possível utilizar o método 'base_url()' | |
//na view | |
$this->load->helper('url'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
//rota definida para que a definição do idioma seja o primeiro nó da URL | |
$route['(:any)'] = 'Welcome/index'; | |
//para rotas adicionas, você pode utilizar algo como | |
//$route['(:any)/minha-rota'] = 'Welcome/meu_metodo'; | |
$route['default_controller'] = 'welcome'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php/$1 [L] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bower, DataTable e CodeIgniter</title> | |
<!-- Folhas de estilo utlizadas no exemplo --> | |
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="bower_components/datatables.net-bs/css/dataTables.bootstrap.css"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Welcome extends CI_Controller { | |
/** | |
* Método para carregar a página principal do exemplo | |
* | |
* @return mixed | |
*/ |