Skip to content

Instantly share code, notes, and snippets.

@toopay
toopay / gas_convention.php
Created November 4, 2011 09:37
Gas ORM - Convention and Examples
<?php
// By default, if you use User as your model name,
// you may should named this file user_gas.php within your models directories
// You can change '_gas' suffix in gas.php under config
class User extends Gas {
// If your table name different with your model name, specify it
// otherwise, you didnt need to declare this property
public $table = 'person';
@toopay
toopay / result.php
Created March 27, 2012 09:23
This extension provide convinience way to work with Gas ORM instance and records
<?php namespace Gas\Extension;
use \Gas\Extension;
class Result implements Extension {
/**
* Extension initialization method
*
* @param object
@toopay
toopay / index.php
Created August 11, 2012 05:52
Front Socket Juriya
<?php
/**
* Juriya - RAD PHP Framework
*
* @package Juriya
* @version 0.0.1
* @author Taufan Aditya
*/
@toopay
toopay / launcher.php
Created August 11, 2012 05:54
Launcher Juriya
<?php if (version_compare(PHP_VERSION, '5.3') < 0) die('Require PHP 5.');
/**
*---------------------------------------------------------------
* Set framework paths and main constants.
*---------------------------------------------------------------
*/
// Define application environment
define('ENVIRONMENT', $environment);
@toopay
toopay / routes.conf.ini
Created August 11, 2012 05:59
Routes Juriya
;;;;;;;;;;;;;;;;;;;;
; routes.conf.ini ;
;;;;;;;;;;;;;;;;;;;;
; Request routes configuration
[ROUTES]
; Register and enable route rule
; Prototype :
; dummy.controller = Dummy
; dummy.arguments.0 = user
@toopay
toopay / modules.conf.ini
Created August 11, 2012 05:59
Modules Juriya
;;;;;;;;;;;;;;;;;;;;
; modules.conf.ini ;
;;;;;;;;;;;;;;;;;;;;
; Modules configuration
[MODULES]
; Register and enable module(s)
; Prototype:
; dummy.namespace = "Mod\Dummy"
; dummy.path = PATH_MOD"dummy"DIRECTORY_SEPARATOR
@toopay
toopay / Hello.php
Created August 11, 2012 06:01
Juriya Controller Example
<?php namespace App;
/**
* Juriya - RAD PHP Framework
*
* Hello controller
*
* @package Juriya
* @category controller
* @version 0.1.1
@toopay
toopay / index.php
Created September 13, 2012 10:58
Explicit Front Socket
<?php
require_once 'Juriya/Juriya.php';
use Juriya\Juriya;
use Juriya\Collection;
use Juriya\Request;
use Juriya\Controller;
use Juriya\ResponseHttp;
@toopay
toopay / index.php
Created October 4, 2012 05:25
Juriya App Socket
<?php
require_once 'Juriya/Juriya.php';
use Juriya\Juriya;
use Juriya\Collection;
use Juriya\Request;
use Juriya\Controller;
use Juriya\ResponseHttp;
@toopay
toopay / test.php
Created October 15, 2012 06:51
SplClassLoader Example
<?php
// Let say we have these directory structure, that follow PSR-0 spec :
//
// system
// - framework
// - Http
// - Request.php
// - Response.php
// test.php