-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7015de
commit e56fec1
Showing
71 changed files
with
7,599 additions
and
2,186 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
deny from all |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* Class callbacks get ran whenever an instance of the specified class | ||
* gets created by the \Get class. | ||
*/ | ||
|
||
$config = static::$config; | ||
|
||
return array( | ||
'IgniteXT.Profiler' => function($profiler) use ($config) { | ||
$profiler->log_everything = false; | ||
}, | ||
|
||
'IgniteXT.Database' => function ($database) use ($config) { | ||
$database->connect_dsn('sqlite:ixt_demo.sqlite'); | ||
}, | ||
|
||
'IgniteXT.Router' => function ($router) use ($config) { | ||
$router->_404 = (object)array( | ||
'controller' => $config->get('404_controller'), | ||
'action' => $config->get('404_action'), | ||
); | ||
$router->routes = $config->get('routes'); | ||
}, | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
// Automatically inject dependencies into these classes. | ||
|
||
return array( | ||
'IgniteXT.Service_Entity' => array( | ||
'config' => 'IgniteXT.Config', | ||
), | ||
|
||
'IgniteXT.Controller' => array( | ||
'db' => 'IgniteXT.Database', | ||
'display' => 'IgniteXT.Display', | ||
'input' => 'IgniteXT.Input', | ||
'router' => 'IgniteXT.Router', | ||
'session' => 'IgniteXT.Session', | ||
), | ||
|
||
'IgniteXT.Model' => array( | ||
'db' => 'IgniteXT.Database', | ||
'display' => 'IgniteXT.Display', | ||
'input' => 'IgniteXT.Input', | ||
'router' => 'IgniteXT.Router', | ||
'session' => 'IgniteXT.Session', | ||
), | ||
|
||
'IgniteXT.Display' => array( | ||
'input' => 'IgniteXT.Input', | ||
'session' => 'IgniteXT.Session', | ||
), | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
return array( | ||
|
||
'soft' => array( | ||
), | ||
|
||
'hard' => 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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
return array( | ||
'inherits' => 'base', | ||
|
||
'ini_set' => array( | ||
'error_reporting' => E_ALL & ~E_NOTICE, | ||
'display_errors' => '1' | ||
), | ||
|
||
'enable_stack_trace' => true, | ||
); |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
return array( | ||
'inherits' => 'base', | ||
|
||
'ini_set' => array( | ||
'error_reporting' => E_ALL & ~E_NOTICE, | ||
'display_errors' => '0' | ||
) | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* Restful Routes | ||
* Syntax: | ||
* $routes[] = array('restful', url, controller, [enable params]); | ||
* Examples: | ||
* $routes[] = array('restful', 'photos', 'Photos'), // example.com/photos/list will resolve to Photos::getList() | ||
* $routes[] = array('restful', '(?P<username>.+?)/photos', 'Users.Photos'), // $_GET['username'] will contain the username variable | ||
* $routes[] = array('restful', '', 'Static_Pages'), // This should be defined last since it will match all URLs | ||
* $routes[] = array('restful', 'users', 'Users', true), //Enable params maps /users/view/123 to \Controllers\Users::view('123') | ||
* | ||
* Direct Routes | ||
* Syntax: | ||
* $routes[] = array('direct', url, controller, action, [enable params], [method]); | ||
* Examples: | ||
* $routes[] = array('direct', 'photos', 'Photos', 'list'), // example.com/photos will resolve to Photos::list() | ||
* $routes[] = array('direct', '', 'Index', 'index', true, 'get'), | ||
* $routes[] = array('direct', 'business-hours', 'Business_Info', 'business_hours', false, 'get'), | ||
*/ | ||
$routes = array(); | ||
$routes[] = array('restful', 'libraries/stopwatch', 'Libraries.Stopwatch'); | ||
$routes[] = array('restful', 'libraries/form-validation', 'Libraries.Form_Validation'); | ||
$routes[] = array('restful', 'user-manager/users', 'User_Manager.Users'); | ||
$routes[] = array('direct', 'user-manager', 'User_Manager.Users', 'get_list', false); | ||
$routes[] = array('restful', '', 'Index'); | ||
return $routes; |
4 changes: 2 additions & 2 deletions
4
...ication/source/base/controllers/index.php → ...ation/source/base/controllers/index.c.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
35 changes: 35 additions & 0 deletions
35
application/source/base/controllers/libraries/form_validation.c.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
namespace Controllers\Libraries; | ||
|
||
class Form_Validation extends \IgniteXT\Controller | ||
{ | ||
function get_index() | ||
{ | ||
$form_validation = \Get::a('IgniteXT.Form_Validation'); | ||
$form_validation->load(); | ||
$this->data['form_validation'] = $form_validation; | ||
$this->display->template('libraries/form_validation'); | ||
} | ||
|
||
function post_index() | ||
{ | ||
$form_validation = \Get::a('IgniteXT.Form_Validation'); | ||
$rules_array = array( | ||
array('first_name', 'First Name', 'required|min_length[2]'), | ||
array('last_name', 'Last Name', 'required|min_length[2]'), | ||
array('email', 'Email', 'required|email'), | ||
array('number', 'Number', 'required|numeric'), | ||
array('integer', 'Integer', 'integer'), | ||
array('decimal', 'Decimal', 'required|decimal|range[10,20]') | ||
); | ||
$form_validation->set_rules($rules_array); | ||
$form_validation->validate($_POST); | ||
|
||
if (strpos($_POST['underscore'],'_') === false) { | ||
$form_validation->set_error('underscore', 'The Underscore field must contain an underscore.'); | ||
} | ||
|
||
$form_validation->save(); | ||
$this->router->redirect('libraries/form-validation'); | ||
} | ||
} |
30 changes: 0 additions & 30 deletions
30
application/source/base/controllers/libraries/form_validation.php
This file was deleted.
Oops, something went wrong.
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
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
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
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
File renamed without changes.
Oops, something went wrong.