This file contains 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
$serie['data'] = array( | |
array('value 1', 20), | |
array('value 2', 45), | |
array('other 3', 60) | |
); | |
$this->highcharts->set_type('pie'); | |
$this->highcharts->set_serie($serie); | |
$data['charts'] = $this->highcharts->render(); |
This file contains 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 | |
/** | |
* plural_or_singular function. | |
* Call singularize or pluralize method by counting a num or an array. | |
* | |
* | |
* @param int $count (default: 1) string, int or array: the value to count | |
* @param string $str (default: '') string to pluralize / singularize | |
* @param bool $w_count (default: false) Determine if the function returns the count | |
* @param string $sep (default: ' ') count - string separator |
This file contains 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 Controller_Decode extends Controller { | |
public function action_iso() | |
{ | |
$content = file_get_contents(DOCROOT.'files/decode/vins.sql'); | |
$content = utf8_decode($content); | |
exit($content); | |
return Response::forge(View::forge('decode/iso', array('content' => $content), false)); |
This file contains 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
header('Content-type: image/jpeg'); | |
$im = imagecreatefromjpeg('test.jpg'); | |
imagefilter($im, IMG_FILTER_GRAYSCALE); | |
imagefilter($im, IMG_FILTER_CONTRAST, 255); | |
imagefilter($im, IMG_FILTER_NEGATE); | |
imagefilter($im, IMG_FILTER_COLORIZE, 55, 157, 18); | |
imagefilter($im, IMG_FILTER_NEGATE); | |
return Response::forge(imagejpeg($im)); |
This file contains 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
public static function is_html($string) | |
{ | |
return strlen(strip_tags($string)) < strlen($string); | |
} |
This file contains 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
$('.fancybox').fancybox({ | |
afterLoad: function(e) { | |
$(e.inner).find('iframe').attr({ | |
'webkitallowfullscreen': true, | |
'mozallowfullscreen': true | |
}); | |
} | |
}); |
This file contains 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
// parent controller in global namespace | |
abstract class Controller_Application extends Controller { | |
protected static $_vm = 'application'; | |
public function before() | |
{ | |
$this->view = ViewModel::forge($this->_vm); | |
} |
This file contains 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
if ( ! class_exists($class)) | |
{ | |
if ( ! class_exists($class = $viewmodel) or ! class_exists($class = '\\View_'.ucfirst($viewmodel))) | |
{ | |
throw new \OutOfBoundsException('ViewModel "View_'.ucfirst(str_replace(array('/', DS), '_', $viewmodel)).'" could not be found.'); | |
} | |
} |
This file contains 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 | |
// Error: Trait method init has not been applied... | |
class Node implements NodeInterface { | |
use Component\Attribute, | |
Component\Manipulation { | |
Component\Attribute::init as protected attributes; | |
Component\Manipulation::init as protected manipulation; | |
} | |
} |
This file contains 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 | |
namespace Project\Raw { | |
define('VT', 100000); | |
$mt['NS no Backslash']['start'] = microtime(true); | |
for ($i = 0; $i < VT; $i++) { | |
is_array(VT); | |
is_string(VT); | |
is_object(VT); |
OlderNewer