- id
- created
- updated
- building name
- flat number
- house number
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 Arr extends Kohana_Arr { | |
/** | |
* Recursive version of [array_map](http://php.net/array_map), applies the | |
* same callback to all elements in an array, including sub-arrays. | |
* | |
* // Apply "strip_tags" to every element in the array | |
* $array = Arr::map('strip_tags', $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 defined('SYSPATH') or die('No direct script access.'); | |
class Controller_Example extends Controller { | |
public function action_index() | |
{ | |
$this->request->response = new View_Example; | |
// or $this->response->body(new View_Example); in K3.1 | |
} |
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 | |
/** | |
* Enable modules. Modules are referenced by a relative or absolute path. | |
*/ | |
Kohana::modules(array( | |
'database' => MODPATH.'database', // Database access | |
'orm' => MODPATH.'orm', // Object Relationship Mapping | |
'kostache' => MODPATH.'kostache', // Object Relationship Mapping | |
)); |
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 | |
// Excerpt from bootstrap.php | |
Kohana::init( | |
array( | |
'base_url' => '/', | |
'index_file' => '', // Important | |
) | |
); |
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
<form> | |
<div id="custom-input"> | |
<!-- slider html or something --> | |
</div> | |
<input type="reset" /> | |
</form> | |
<script> | |
$(function () { | |
$('form').reset(function () { | |
$('#custom-input').trigger('reset'); |
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
.slider-container { | |
width: 600px; | |
height: 200px; | |
overflow: hidden; | |
position: relative; | |
} | |
.slider ul, .slider li { | |
margin: 0; | |
padding: 0; | |
list-style: none; |
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
<pre><?php | |
// A nice simple 2 dimensional array | |
$people = array( | |
// array($name, $age) | |
array('Jim', 20), | |
array('Betty', 50), | |
array('Bob', 35), | |
array('Rob', 22), | |
array('Rachel', 40), |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Testing jQuery.sub()</title> | |
</head> | |
<body> | |
<div class="example">Testing</div> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> | |
<script src="with-jquery.sub.js"></script> | |
<script> |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Messages</title> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<ul id="messages"> | |
<li id="message-1"> | |
<div class="message">Message</div> |