Skip to content

Instantly share code, notes, and snippets.

View isaiahdw's full-sized avatar

Isaiah DeRose-Wilson isaiahdw

  • SmartRent
  • Scottsdale, AZ
View GitHub Profile
class form extends form_core {
public static $errors = array();
public static $form_data = array();
public static $lang_key;
public static function open($attr = array(), $lang_key = '', $errors = array(), $form_data = array(), $hidden = NULL)
{
is_string($attr) AND $attr = array('action' => $attr);
class Contact_Model extends Model
{
public function read_contact($contact_id)
{
if(is_numeric($contact_id))
{
$query = ORM::factory('contact', $contact_id)->find();
}
else throw new Exception('Not a valid contact ID');
<?php defined('SYSPATH') or die('No direct script access.');
/**
* @package Core
*
* Generates a file to aid Zend Studio's code completion.
* Kohana uses class suffixes which aren't used when the class is instantiated.
* This script builds a lookup table of class names minus the suffix
*
* @author Peter Bowyer <peter@mapledesign.co.uk>
* @thanks Maple Design Ltd - http://www.mapledesign.co.uk/code/
<?php
set_error_handler('my_error_handler');
session_start();
class myclass implements Serializable
{
private $a = 1;
private $b = 2;
<?php
// Pass the data to the object
$user = ORM::factory('user')
->values($_POST, array('display_name', 'username', 'password', 'company_id', 'email', 'group_id'));
// Additional validation. Remember we need to pass in $_POST again so we can validate the extra fields!
$user->validate($_POST)
->rule('password_confirm', 'matches', array('password'));
getReturnURL : function(httpReq) {
xmlObj = new DOMParser().parseFromString(httpReq.responseText, "text/xml");
var gist_id = xmlObj.getElementsByTagName("repo")[0].textContent;
return 'http://gist.github.com/'+ gist_id;
},
getReturnURL : function(httpReq) {
xmlObj = new DOMParser().parseFromString(httpReq.responseText, "text/xml");
var gist_id = xmlObj.getElementsByTagName("repo")[0].textContent;
return 'http://gist.github.com/'+ gist_id;
},
classes/kohana/response.php | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/classes/kohana/response.php b/classes/kohana/response.php
index 6ec1a28..ad856b9 100644
--- a/classes/kohana/response.php
+++ b/classes/kohana/response.php
@@ -177,6 +177,11 @@ class Kohana_Response implements Http_Response, Serializable {
protected $_protocol;
classes/kohana/response.php | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/classes/kohana/response.php b/classes/kohana/response.php
index 6ec1a28..ad856b9 100644
--- a/classes/kohana/response.php
+++ b/classes/kohana/response.php
@@ -177,6 +177,11 @@ class Kohana_Response implements Http_Response, Serializable {
protected $_protocol;
body { background: #f1f8db !important; }
#Body {
margin: 15px 0 0 !important;
overflow: visible !important;
padding: 0 15px !important;
position: relative !important;
width: auto !important;
}