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 | |
/** | |
* A simple class for tracking execution times of PHP scripts and logging them into CVS files | |
* @author Bernhard Häussner | |
* @see https://gist.github.com/846504 | |
*/ | |
class Profile { | |
private $_start = array(); | |
private $_subdata = ''; |
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 defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* People API - Example Code | |
* | |
* @author icyleaf <icyleaf.cn@gmail.com> | |
* @link http://icyleaf.com | |
* @version 0.1 | |
*/ | |
class Controller_API_People extends Controller_REST { |
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 | |
/** | |
* Quickly assemled rest controller based on Kohana 3's Kohana_Controller_REST | |
* https://github.com/kohana/core/blob/3.1%2Fmaster/classes/kohana/controller/rest.php | |
* | |
* Added functionality from FuelPHP's Controller_Rest | |
* https://github.com/fuel/fuel/blob/develop/fuel/core/classes/controller/rest.php | |
* | |
* All credits to Kohana and FuelPHP teams! | |
* Jonas Nyström - cambiata |
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 | |
/** | |
* Test controller extending Controller_Cambiata_REST | |
* Jonas Nyström - cambiata | |
* | |
* To be used with a route like this one: | |
* | |
* Route::set('rest', 'rest(/<par1>(/<par2>(/<par3>(/<par4>(/<par5>)))))(.<format>)') | |
* ->defaults(array( |
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 | |
/** | |
* Attempt to wrap Http Authentication into a separate class... | |
* | |
* Ideas and some code from FuelPHP Controller_Rest | |
* https://github.com/fuel/fuel/blob/develop/fuel/core/classes/controller/rest.php | |
* | |
*/ |
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 defined('SYSPATH') or die('No direct access allowed.'); | |
/** | |
* Ajax Template Controller template | |
* | |
* @author Sergei Gladkovskiy <smgladkovskiy@gmail.com> | |
*/ | |
abstract class Controller_Ajax_Template extends Controller { | |
protected $_auth_required = 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
/** | |
* Größer Als Methode | |
* | |
* @static | |
* @param $validation | |
* @param $field1 | |
* @param $field2 | |
* @param $field2_name string Wird für den Fehlertext benutzt, und sollte die Bezeichnung des Feld1 beinhalten | |
* @return bool | |
*/ |
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
/** | |
* Kleiner Als Methode | |
* | |
* @static | |
* @param $validation | |
* @param $field1 | |
* @param $field2 | |
* @param $field2_name string Wird für den Fehlertext benutzt, und sollte die Bezeichnung des Feld1 beinhalten | |
* @return bool | |
*/ |
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 defined('SYSPATH') or die('No direct script access.'); | |
// -- Environment setup -------------------------------------------------------- | |
// Load the core Kohana class | |
require SYSPATH.'classes/kohana/core'.EXT; | |
if (is_file(APPPATH.'classes/kohana'.EXT)) | |
{ | |
// Application extends the core |
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 | |
Route::set('cms', function($uri) { | |
if (empty($uri)) | |
{ | |
$default_route = Route::get('default'); | |
$controller = Arr::get($default_route->defaults(), 'controller'); | |
$action = Arr::get($default_route->defaults(), 'action'); | |
OlderNewer