Application Error
Controller 'images_controller' not found in /home/content/z/u/b/zubairrr/html/www.thebentleygroup.com/app/controllers/
Debug Trace
-
#2 creovel::include_controller('images') in /home/content/z/u/b/zubairrr/html/www.thebentleygroup.com/vendor/creovel/classes/creovel.php on line 61
#0001
#0002
#0003
#0004
#0005
#0006
#0007
#0008
#0009
#0010
#0011
#0012
#0013
#0014
#0015
#0016
#0017
#0018
#0019
#0020
#0021
#0022
#0023
#0024
#0025
#0026
#0027
#0028
#0029
#0030
#0031
#0032
#0033
#0034
#0035
#0036
#0037
#0038
#0039
#0040
#0041
#0042
#0043
#0044
#0045
#0046
#0047
#0048
#0049
#0050
#0051
#0052
#0053
#0054
#0055
#0056
#0057
#0058
#0059
#0060
#0061
#0062
#0063
#0064
#0065
#0066
#0067
#0068
#0069
#0070
#0071
#0072
#0073
#0074
#0075
#0076
#0077
#0078
#0079
#0080
#0081
#0082
#0083
#0084
#0085
#0086
#0087
#0088
#0089
#0090
#0091
#0092
#0093
#0094
#0095
#0096
#0097
#0098
#0099
#0100
#0101
#0102
#0103
#0104
#0105
#0106
#0107
#0108
#0109
#0110
#0111
#0112
#0113
#0114
#0115
#0116
#0117
#0118
#0119
#0120
#0121
#0122
#0123
#0124
#0125
#0126
#0127
#0128
#0129
#0130
#0131
#0132
#0133
#0134
#0135
#0136
#0137
#0138
#0139
#0140
#0141
#0142
#0143
#0144
#0145
#0146
#0147
#0148
#0149
#0150
#0151
#0152
#0153
#0154
#0155
#0156
#0157
#0158
#0159
#0160
#0161
#0162
#0163
#0164
#0165
#0166
#0167
#0168
#0169
#0170
#0171
#0172
#0173
#0174
#0175
#0176
#0177
#0178
#0179
#0180
#0181
#0182
#0183
#0184
#0185
#0186
#0187
#0188
#0189
#0190
#0191
#0192
#0193
#0194
#0195
#0196
#0197
#0198
#0199
#0200
#0201
#0202
#0203
#0204
#0205
#0206
#0207
#0208
#0209
#0210
#0211
#0212
#0213
#0214
#0215
#0216
#0217
#0218
#0219
#0220
#0221
#0222
#0223
#0224
#0225
#0226
#0227
#0228
#0229
#0230
#0231
#0232
<?php
/**
* Copyright (c) 2005-2006, creovel.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Licensed under The MIT License. Redistributions of files must retain the above copyright notice.
*/
/*
* Framework base class.
*
* @copyright Copyright (c) 2005-2006, creovel.org
* @package creovel
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @todo test nested controllers
*/
class creovel
{
const VERSION = '0.01';
const RELEASE_DATE = 'Nov 24 2005 16:55:55';
/**
* Run framework.
*
* @author Nesbert Hidalgo
* @access public
* @param array $events optional assoc. array of CONTORLLER, ACTION & ID
* @param array $events optional assoc. array of params
* @param bool $return_as_str optional returns controller as string
* @return object
*/
public function run($events = null, $params = null, $return_as_str = false)
{
// set-up environment
require_once( CONFIG_PATH . 'environments' . DS . ( $_ENV['mode'] = ( isset($_ENV['mode']) ? $_ENV['mode'] : 'development' ) ) . '.php' );
// set event and params
$events = $events ? $events : self::get_events($server);
$params = $params ? $params : self::get_params();
// include controllers and helpers
if ( is_array($events['nested_controllers']) ) {
$path = '';
foreach ( $events['nested_controllers'] as $nested_controller ) {
self::include_controller($path.$nested_controller);
$path .= $nested_controller.DS;
}
} else {
self::include_controller($events['controller']);
}
// create controller object and build the framework
$controller = $events['controller'] . '_controller';
$controller = new $controller();
// set controller properties
$controller->_set_events($events);
$controller->_set_params($params);
// execute action
$controller->_execute_action();
// output to user
return $controller->_output($return_as_str);
}
/**
* Returns the framework events (CONTROLLER, ACTION & ID).
*
* @author Nesbert Hidalgo
* @access public
* @param string $event_to_return optional name of event to return
* @return array
*/
public function get_events($event_to_return = null)
{
// read URI which was given in order to access this page, remove any trailing forward slashes
$uri = $uri ? $uri : $GLOBALS['_SERVER']['REQUEST_URI'];
$uri = explode('?', ( $uri{strlen($uri) - 1} == '/' ? substr($uri, 0, strlen($uri) - 1) : $uri ));
if (isset($_ENV['routes'][$uri[0]])) header('Location: '.$_ENV['routes'][$uri[0]]);
// get event args from uri
$args = explode(DS, substr($uri[0], 1));
// check/set nested controllers
$path = '';
foreach ( $args as $arg ) {
if ( file_exists(CONTROLLERS_PATH.$path.$arg.'_controller.php') ) {
$events['nested_controllers'][] = $arg;
}
$path .= $arg.DS;
}
// set events for framework with array indexes
switch ( true ) {
case ( count($events['nested_controllers']) > 1 ):
$events['controller'] = $events['nested_controllers'][ count($events['nested_controllers']) - 1 ];
foreach ( $args as $key => $arg ) {
if ( $arg == $events['controller'] ) {
$events['action'] = $args[ $key + 1 ];
$id = $args[ $key + 2 ];
break;
}
}
break;
case ( count($args) > 2 ):
$events['controller'] = $args[ count($args) - 3 ];
$events['action'] = $args[ count($args) - 2 ];
$id = $args[ count($args) - 1 ];
break;
default:
$events['controller'] = $args[0];
$events['action'] = $args[1];
break;
}
// return id only
if ( $event_to_return == 'id' ) {
return $id;
}
// set controller & action
$events['controller'] = $events['controller'] ? $events['controller'] : $_ENV['routes']['default']['controller'];
$events['action'] = $events['action'] ? $events['action'] : $_ENV['routes']['default']['action'];
return ( $event_to_return ? $events[$event_to_return] : $events );
}
/**
* Returns the framework params.
*
* @author Nesbert Hidalgo
* @access public
* @param string $param_to_return optional name of param to return
* @return array
*/
public function get_params($param_to_return = null)
{
// intialize params
$params = ( $id = self::get_events('id') ) ? array('id'=>$id) : array();
$requests = array($_GET, $_POST);
// add each request add keys & values to $params
foreach ( $requests as $request ) {
if ( count($request) === 0 ) continue;
foreach ( $request as $field => $value ) $params[$field] = $value;
}
// $GLOBALS['HTTP_RAW_POST_DATA'] used for observer ajax calls
// Note: HTTP_RAW_POST_DATA must set to on in php.ini
if ( $GLOBALS['HTTP_RAW_POST_DATA'] ) {
$params['raw_post'] = str_replace('&_=', '', $GLOBALS['HTTP_RAW_POST_DATA']);
}
// unset blank vaiable set by $GLOBALS['HTTP_RAW_POST_DATA']
unset($params['_']);
return ( $param_to_return ? $params[$param_to_return] : $params );
}
/**
* Includes the required files for a controller and the controller helpers.
*
* @author Nesbert Hidalgo
* @access private
* @param string $controller_path required
*/
private function include_controller($controller_path)
{
// include application controller
$controllers = array_merge(array('application'), explode(DS, $controller_path));
$path = '';
foreach ( $controllers as $controller ) {
$class = $controller . '_controller';
$controller_path = CONTROLLERS_PATH . $path . $class . '.php';
$helper_path = HELPERS_PATH . $path . $controller . '_helper.php';
try {
if ( $class == '_controller' ) {
$_ENV['error']->add("Looking for an 'Unknown Controller' in <strong>".str_replace('_controller'.'.php', '', $controller_path)."</strong>");
}
if ( file_exists($controller_path) ) {
require_once($controller_path);
} else {
$controller_path = str_replace($class . '.php', '', $controller_path);
throw new Exception("Controller '{$class}' not found in <strong>".str_replace('_controller'.'.php', '', $controller_path)."</strong>");
}
} catch ( Exception $e ) {
// add to errors
$_ENV['error']->add($e->getMessage(), $e);
}
// include helper
if ( file_exists($helper_path) ) require_once($helper_path);
// append to path if a nested controller
$path .= str_replace('application'.DS, '', $controller.DS);
}
}
}
?> -
#1 creovel::run() in /home/content/z/u/b/zubairrr/html/www.thebentleygroup.com/public/dispatch.php on line 32
#0001
#0002
#0003
#0004
#0005
#0006
#0007
#0008
#0009
#0010
#0011
#0012
#0013
#0014
#0015
#0016
#0017
#0018
#0019
#0020
#0021
#0022
#0023
#0024
#0025
#0026
#0027
#0028
#0029
#0030
#0031
#0032
#0033
<?php
/**
* Copyright (c) 2005-2006, creovel.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Licensed under The MIT License. Redistributions of files must retain the above copyright notice.
*/
/**
* This file calls the event and creates the page to be displayed. Created on 10/20/2005.
*
* @copyright Copyright (c) 2005-2006, creovel.org
* @package creovel
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
require_once('../config/environment.php');
$GLOBALS['serverdata'] = $_SERVER;
creovel::run();
?>