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 | |
$this->_response_links += array( | |
'create' => $this->_generate_link('POST', Route::url('api', array( | |
'controller' => $this->request->controller(), | |
'id' => NULL, | |
))), | |
'read' => $this->_generate_link('GET', Route::url('api', array( | |
'controller' => $this->request->controller(), | |
'id' => $this->request->param('id'), |
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 | |
// 1 Property | |
class Minion_Task_Example extends Minion_Task { | |
protected $_options = array( | |
'force' => array( | |
'default' => NULL, | |
// Defaults to --{{key}} (--force in this case) | |
'alternate_names' => array('-f'), |
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.'); | |
class Controller_Test2 { | |
public function action_index() | |
{ | |
// State can be used to bring the user back to where they originally were before the redirect.. | |
$state = json_decode($this->request->query('state')); | |
// Load up the right consumer | |
$client = OAuth2_Consumer::factory('mip'); |
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 ORM extends Kohana_ORM { | |
public function create(Validation $validation = NULL) | |
{ | |
$this->_pre_create(); | |
$return = parent::create($validation); |
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.'); | |
/** | |
* | |
* | |
* @package OAuth2 | |
* @category Library | |
* @author Managed I.T. | |
* @copyright (c) 2011 Managed I.T. | |
* @license https://github.com/managedit/kohana-oauth2/blob/master/LICENSE.md | |
*/ |
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
. | |
./oauth2 | |
./oauth2/provider.php | |
./oauth2/exception.php | |
./oauth2/exception | |
./oauth2/exception/invalidgrant.php | |
./oauth2/exception/insufficientscope.php | |
./oauth2/exception/invalidclient.php | |
./oauth2/exception/unsupportedgranttype.php | |
./oauth2/exception/invalidrequest.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
{ | |
"metadata":{ | |
"error":false, | |
"total":3, | |
"fetched":3, | |
"offset":0, | |
"limit":25, | |
"type":"job" | |
}, | |
"actions":{ |
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.'); | |
/** | |
* | |
* | |
* @package MIP Website | |
* @category Controller | |
* @author Managed I.T. | |
* @copyright (c) 2011 Managed I.T. | |
*/ | |
class Controller_Test extends Controller { |
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
class Bla | |
def some_method() | |
begin | |
// Do some shit | |
rescue | |
retry if bla bla | |
ensure | |
// Normal Finally block | |
end | |
rescue |
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 | |
// Fire up a router and add some routes ... | |
$router = Router::factory(); | |
// This one handles PUT and POST requests | |
$route_one = Route::factory('tickets_one') | |
->method(array( | |
'POST', | |
'PUT' |