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 | |
/** | |
* CodeIgniter | |
* | |
* An open source application development framework for PHP 5.2.4 or newer | |
* | |
* NOTICE OF LICENSE | |
* | |
* Licensed under the Open Software License version 3.0 | |
* |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* CodeIgniter | |
* | |
* An open source application development framework for PHP 5.2.4 or newer | |
* | |
* NOTICE OF LICENSE | |
* | |
* Licensed under the Academic Free License version 3.0 | |
* |
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 | |
class DisplayHook | |
{ | |
public function captureOutput() | |
{ | |
$this->CI =& get_instance(); | |
$output = $this->CI->output->get_output(); | |
if (ENVIRONMENT != 'testing') { |
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" | |
stopOnFailure="false" | |
backupGlobals="false" | |
backupStaticAttributes="false" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" |
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 | |
/* | |
*--------------------------------------------------------------- | |
* APPLICATION ENVIRONMENT | |
*--------------------------------------------------------------- | |
*/ | |
define('ENVIRONMENT', 'testing'); |
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 | |
class PostTest extends PHPUnit_Framework_TestCase | |
{ | |
private $CI; | |
public function setUp() | |
{ | |
$this->CI = &get_instance(); | |
$this->CI->load->database('testing'); |
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 | |
class Post extends CI_Model | |
{ | |
public function getAll() | |
{ | |
$query = $this->db->get('posts'); | |
$posts = array(); | |
foreach ($query->result_array() as $row) { |
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
// BASE_URL é uma variável javascript que pega o valor da função 'base_url()' do CI | |
$.post(BASE_URL + 'C_app/pedido', | |
{ | |
status: status, | |
id: id | |
}, function(data){ | |
alert(result); | |
}, 'html'); |
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 if (!defined('BASEPATH')) {exit('No direct script access allowed');} | |
class Twig { | |
/** | |
* Referência da instância da classe CodeIgniter | |
* | |
* @var object | |
*/ | |
protected $CI; |
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
Show hidden characters
{ | |
"color_scheme": "Packages/User/Twilight (SL).tmTheme", | |
"default_line_ending": "unix", | |
"detect_indentation": true, | |
"fallback_encoding": "UTF-8", | |
"font_size": 10, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ |