Skip to content

Commit 148af7c

Browse files
committed
Cleanup: After taking a pause to address other projects. Push the latest code before working on this.
1 parent 4498a0b commit 148af7c

File tree

15 files changed

+232
-225
lines changed

15 files changed

+232
-225
lines changed

core/MY_Loader.php

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
// ----------------------------------------------------------------------
4242

4343
/**
44-
* Extend the Loader Core Class
44+
* Extend, Override, Replace the Loader Core Class
4545
*
4646
* When adding functionality to an existing library, the normal method is to
4747
* extend the parent class in CodeIgniter. MY_Loader extends CI_Loader
@@ -50,55 +50,14 @@
5050
* inheritance. MY_Loader extends MX_Loader extends CI_Loader
5151
*
5252
* @package third_party/MX/Loader.php
53+
*
5354
* @subpackage MX_Loader
5455
*/
5556
class MY_Loader extends MX_Loader {
5657
// Method overriding is handled by MX_Loader
5758
// Methods added here will overide both MX_Loader and CI_Loader
58-
59-
60-
// TWIGS
61-
62-
public function __construct()
63-
{
64-
parent::__construct();
65-
}
66-
6759
// --------------------------------------------------------------------
6860

69-
70-
7161
// --------------------------------------------------------------------
7262

73-
/**
74-
* Config Loader
75-
*
76-
* Loads a config file (an alias for CI_Config::load()).
77-
*
78-
* @uses CI_Config::load()
79-
* @param string $file Configuration file name
80-
* @param bool $use_sections Whether configuration values should be loaded into their own section
81-
* @param bool $fail_gracefully Whether to just return FALSE or display an error message
82-
* @return bool TRUE if the file was loaded correctly or FALSE on failure
83-
*/
84-
public function config($file, $use_sections = FALSE, $fail_gracefully = FALSE)
85-
{
86-
//return get_instance()->config->load($file, $use_sections, $fail_gracefully);
87-
88-
return CI::$APP->config->load($file, $use_sections, $fail_gracefully, $this->_module);
89-
90-
91-
}
92-
93-
// --------------------------------------------------------------------
94-
95-
96-
// --------------------------------------------------------------------
97-
// --------------------------------------------------------------------
98-
// --------------------------------------------------------------------
99-
// --------------------------------------------------------------------
100-
// --------------------------------------------------------------------
101-
102-
103-
10463
}

core/MY_Router.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
// ----------------------------------------------------------------------
4242

4343
/**
44-
* Extend the Router Core Class
44+
* Extend, Override, Replace the Router Core Class
4545
*
4646
* When adding functionality to an existing library, the normal method is to
4747
* extend the parent class in CodeIgniter. MY_Router extends CI_Router
@@ -56,4 +56,8 @@
5656
class MY_Router extends MX_Router {
5757
// Method overriding is handled by MX_Router
5858
// Methods added here will overide both MX_Router and CI_Router
59+
// --------------------------------------------------------------------
60+
61+
// --------------------------------------------------------------------
62+
5963
}

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
# built documents.
6565
#
6666
# The short X.Y version.
67-
version = '0.0.1'
67+
version = '0.0.2'
6868
# The full version, including alpha/beta/rc tags.
69-
release = '0.0.1'
69+
release = '0.0.2'
7070

7171
# The language for content autogenerated by Sphinx. Refer to documentation
7272
# for a list of supported languages.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
defined('BASEPATH') OR exit('No direct script access allowed');
3+
/* vim: set expandtab tabstop=4 shiftwidth=4 encoding=utf-8: */
4+
5+
$config['environment'] = 'development';
6+
$config['bravo'] = 'development';
7+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
defined('BASEPATH') OR exit('No direct script access allowed');
3+
/* vim: set expandtab tabstop=4 shiftwidth=4 encoding=utf-8: */
4+
5+
$config['environment'] = 'production';
6+
$config['bravo'] = 'production';
7+

tests/application/config/test_one.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
defined('BASEPATH') OR exit('No direct script access allowed');
3+
/* vim: set expandtab tabstop=4 shiftwidth=4 encoding=utf-8: */
4+
5+
$config['environment'] = 'application';
6+
$config['alpha'] = 'application';
7+
$config['bravo'] = 'application';
8+
$config['charlie'] = 'application';
9+
$config['echo'] = 'application';
10+
$config['delta'] = 'application';
11+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
defined('BASEPATH') OR exit('No direct script access allowed');
3+
/* vim: set expandtab tabstop=4 shiftwidth=4 encoding=utf-8: */
4+
5+
$config['environment'] = 'testing';
6+
$config['bravo'] = 'testing';

tests/application/helpers/MY_test_alpha_helper.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,49 @@ function alpha_zulu() {
3838
function alpha_two() {
3939
return 'application';
4040
}
41+
42+
43+
function asset($path) {
44+
//return pathinfo($path);
45+
46+
$asset = 'assets'. DIRECTORY_SEPARATOR . $path;
47+
$asset_path = preg_replace('#/+#','/',$asset);
48+
foreach (Modules::mx_module_paths() AS $module) {
49+
50+
$myPath = $module . DIRECTORY_SEPARATOR . $asset_path;
51+
52+
if (realpath($myPath)) {
53+
54+
//$str = preg_replace(FCPATH, '', realpath($module));
55+
return base_url() . clean_path($myPath);
56+
/*} else {*/
57+
//$myPath = FCPATH . DIRECTORY_SEPARATOR . $asset_path;
58+
//return realpath($myPath);
59+
60+
61+
}
62+
63+
}
64+
65+
return base_url() . $asset_path;
66+
67+
//return debug_backtrace();
68+
//return CI::$APP->router->fetch_module();
69+
70+
//return base_url();
71+
72+
73+
//$clean = preg_replace('#/+#','/',$path);
74+
//return $clean;
75+
76+
77+
}
78+
79+
function clean_path($path) {
80+
81+
$front_controller = explode('/', realpath(FCPATH));
82+
$compate_path = explode('/', realpath($path));
83+
84+
return implode('/', array_diff_key($compate_path, $front_controller));
85+
86+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
defined('BASEPATH') OR exit('No direct script access allowed');
3+
/* vim: set expandtab tabstop=4 shiftwidth=4 encoding=utf-8: */
4+
5+
$config['echo'] = 'mod::development';
6+
$config['delta'] = 'mod::development';
7+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
defined('BASEPATH') OR exit('No direct script access allowed');
3+
/* vim: set expandtab tabstop=4 shiftwidth=4 encoding=utf-8: */
4+
5+
$config['echo'] = 'mod::production';
6+
$config['delta'] = 'mod::production';
7+

0 commit comments

Comments
 (0)