Exception
Error
Non-static method app\models\Items::satchelOptions() cannot be called statically
Source
Stack Trace
-
[exception]
/var/app/current/app/libraries/quotes/controllers/BookingsController.php: 128
123 * Step 1
124 */
125 public function index() {
126 $member = Members::current();
127 $id = $this->request->id;
128 $satchelOptions = Items::satchelOptions();
129 $excludedSatchelKeys = array_keys($satchelOptions);
130 $packageTypes = array_filter(Items::getPackageTypes(), function ($type) use ($excludedSatchelKeys) {
131 return !in_array($type, $excludedSatchelKeys);
132 });
133
-
lithium\action\Controller::__invoke()::{closure} @ 192
/var/app/current/libraries/lithium/action/Controller.php: 206
201 if (!method_exists($this, $action)) {
202 throw new DispatchException("Action `{$action}` not found.");
203 }
204 $this->_render['template'] = $this->_render['template'] ?: $action;
205
206 if ($result = call_user_func_array([$this, $action], $args)) {
207 if (is_string($result)) {
208 $this->render(['text' => $result]);
209 return $this->response;
210 }
211 if (is_array($result)) {
-
lithium\aop\Filters::run()
/var/app/current/libraries/lithium/aop/Filters.php: 229
224 * @param callable $implementation
225 * @return mixed The result of running the chain.
226 */
227 public static function run($class, $method, array $params, $implementation) {
228 if (!static::hasApplied($class, $method)) {
229 return $implementation($params);
230 }
231 return static::_chain($class, $method)->run($params, $implementation);
232 }
233
234 /**
-
lithium\action\Controller::__invoke()
/var/app/current/libraries/lithium/action/Controller.php: 192
187 * for caching it).
188 */
189 public function __invoke($request, $dispatchParams, array $options = []) {
190 $params = compact('request', 'dispatchParams', 'options');
191
192 return Filters::run($this, __FUNCTION__, $params, function($params) {
193 $dispatchParams = $params['dispatchParams'];
194
195 $action = isset($dispatchParams['action']) ? $dispatchParams['action'] : 'index';
196 $args = isset($dispatchParams['args']) ? $dispatchParams['args'] : [];
197
-
lithium\action\Dispatcher::lithium\action\{closure}() @ ?
/var/app/current/libraries/lithium/action/Dispatcher.php: 277
272 */
273 protected static function _call($callable, $request, $params) {
274 $params = compact('callable', 'request', 'params');
275 return Filters::run(get_called_class(), __FUNCTION__, $params, function($params) {
276 if (is_callable($callable = $params['callable'])) {
277 return $callable($params['request'], $params['params']);
278 }
279 throw new DispatchException('Result not callable.');
280 });
281 }
282}
-
lithium\aop\Chain::__invoke()
/var/app/current/libraries/lithium/aop/Chain.php: 146
141 if (($filter = next($this->_filters)) !== false) {
142 return $filter($params, $this);
143 }
144
145 $implementation = $this->_implementation;
146 return $implementation($params);
147 }
148}
149
150
-
/var/app/current/app/libraries/api/config/bootstrap.php::{closure} @ 43
/var/app/current/app/libraries/api/config/bootstrap.php: 60
55 'message' => 'Unsupported Media Type',
56 'code' => 415,
57 ])
58 ]);
59 }
60 return $next($params);
61 });
62
63 //var_dump( dirname(__FILE__) . '/../'); die();
-
lithium\aop\Chain::__invoke()
/var/app/current/libraries/lithium/aop/Chain.php: 142
137 * @return mixed The return value of the next filter. If there is no
138 * next filter, the return value of the implementation.
139 */
140 public function __invoke(array $params) {
141 if (($filter = next($this->_filters)) !== false) {
142 return $filter($params, $this);
143 }
144
145 $implementation = $this->_implementation;
146 return $implementation($params);
147 }
-
app\rules\AccessRules::app\rules\{closure}() @ ?
/var/app/current/app/rules/AccessRules.php: 91
86
87 $result = static::validate($controller, $request);
88
89 // no error
90 if ($result === true)
91 return $next($params);
92
93 // if the result is not an array, this means it is a custom response
94 if ( !is_array($result) )
95 return $result;
96
-
lithium\aop\Chain::run()
/var/app/current/libraries/lithium/aop/Chain.php: 113
108 */
109 public function run(array $params, $implementation) {
110 $this->_implementation = $implementation;
111
112 $filter = reset($this->_filters);
113 $result = $filter($params, $this);
114
115 $this->_implementation = null;
116 return $result;
117 }
118
-
lithium\aop\Filters::run()
/var/app/current/libraries/lithium/aop/Filters.php: 231
226 */
227 public static function run($class, $method, array $params, $implementation) {
228 if (!static::hasApplied($class, $method)) {
229 return $implementation($params);
230 }
231 return static::_chain($class, $method)->run($params, $implementation);
232 }
233
234 /**
235 * Clears filters optionally constrained by class or class and method combination.
236 *
-
lithium\action\Dispatcher::_call()
/var/app/current/libraries/lithium/action/Dispatcher.php: 275
270 * `Closure`, or does not declare the PHP magic `__invoke()` method.
271 * @filter
272 */
273 protected static function _call($callable, $request, $params) {
274 $params = compact('callable', 'request', 'params');
275 return Filters::run(get_called_class(), __FUNCTION__, $params, function($params) {
276 if (is_callable($callable = $params['callable'])) {
277 return $callable($params['request'], $params['params']);
278 }
279 throw new DispatchException('Result not callable.');
280 });
-
lithium\action\Dispatcher::run()::{closure} @ 154
/var/app/current/libraries/lithium/action/Dispatcher.php: 169
164
165 if (!$params) {
166 throw new DispatchException('Could not route request.');
167 }
168 $callable = static::_callable($result, $params, $options);
169 return static::_call($callable, $result, $params);
170 });
171 }
172
173 /**
174 * Attempts to apply a set of formatting rules from `$_rules` to a `$params` array, where each
-
lithium\aop\Chain::__invoke()
/var/app/current/libraries/lithium/aop/Chain.php: 146
141 if (($filter = next($this->_filters)) !== false) {
142 return $filter($params, $this);
143 }
144
145 $implementation = $this->_implementation;
146 return $implementation($params);
147 }
148}
149
150
-
/var/app/current/app/config/bootstrap/cache.php::{closure} @ 79
/var/app/current/app/config/bootstrap/cache.php: 81
76 /**
77 * Caches paths for auto-loaded and service-located classes when in production.
78 */
79 \lithium\aop\Filters::apply('\lithium\action\Dispatcher','run', function( $params, $next) {
80 if (!Environment::is('production')) {
81 return $next($params);
82 }
83 $key = md5(LITHIUM_APP_PATH) . '.core.libraries';
84
85 if ($cache = Cache::read('default', $key)) {
86 $cache = (array) $cache + Libraries::cache();
-
lithium\aop\Chain::__invoke()
/var/app/current/libraries/lithium/aop/Chain.php: 142
137 * @return mixed The return value of the next filter. If there is no
138 * next filter, the return value of the implementation.
139 */
140 public function __invoke(array $params) {
141 if (($filter = next($this->_filters)) !== false) {
142 return $filter($params, $this);
143 }
144
145 $implementation = $this->_implementation;
146 return $implementation($params);
147 }
-
/var/app/current/app/config/bootstrap/logging.php::{closure} @ 186
/var/app/current/app/config/bootstrap/logging.php: 209
204 // Always make sure to keep the filter chain going.
205 return $next($params);
206 });
207 // }
208
209 return $next($params);
210});
211
-
lithium\aop\Chain::__invoke()
/var/app/current/libraries/lithium/aop/Chain.php: 142
137 * @return mixed The return value of the next filter. If there is no
138 * next filter, the return value of the implementation.
139 */
140 public function __invoke(array $params) {
141 if (($filter = next($this->_filters)) !== false) {
142 return $filter($params, $this);
143 }
144
145 $implementation = $this->_implementation;
146 return $implementation($params);
147 }
-
/var/app/current/app/config/bootstrap/logging.php::{closure} @ 165
/var/app/current/app/config/bootstrap/logging.php: 180
175 // Always make sure to keep the filter chain going.
176 return $next($params);
177 });
178 // }
179
180 return $next($params);
181});
182
183\lithium\aop\Filters::apply('\lithium\action\Dispatcher','run', function( $params, $next) {
184 // if (!Environment::is('production')) {
185 // Filter the database adapter returned from the Connections object.
-
lithium\aop\Chain::__invoke()
/var/app/current/libraries/lithium/aop/Chain.php: 142
137 * @return mixed The return value of the next filter. If there is no
138 * next filter, the return value of the implementation.
139 */
140 public function __invoke(array $params) {
141 if (($filter = next($this->_filters)) !== false) {
142 return $filter($params, $this);
143 }
144
145 $implementation = $this->_implementation;
146 return $implementation($params);
147 }
-
/var/app/current/app/config/bootstrap/action.php::{closure} @ 59
/var/app/current/app/config/bootstrap/action.php: 67
62 /**
63 * @todo confirm/check what should be in Access-Control-Allow-Origin. It may be we should be setting different
64 * values for the API out in the wild vs accessing the api from the site/admin/members
65 */
66 if (!Environment::is('test')) {
67 $response = $next($params);
68 $origin = $params['request']->env('HTTP_ORIGIN');
69
70 $response->headers['Access-Control-Allow-Origin'] = (string) $origin; // Caused strange warning - leave
71 $response->headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, PATCH, OPTIONS';
72 $response->headers['Access-Control-Allow-Headers'] = '*, X-Requested-With, X-Prototype-Version, X-CSRF-Token, Content-Type';
-
lithium\aop\Chain::__invoke()
/var/app/current/libraries/lithium/aop/Chain.php: 142
137 * @return mixed The return value of the next filter. If there is no
138 * next filter, the return value of the implementation.
139 */
140 public function __invoke(array $params) {
141 if (($filter = next($this->_filters)) !== false) {
142 return $filter($params, $this);
143 }
144
145 $implementation = $this->_implementation;
146 return $implementation($params);
147 }
-
lithium\core\ErrorHandler::apply()::{closure} @ 243
/var/app/current/libraries/lithium/core/ErrorHandler.php: 247
242
243 Filters::apply($class, $method, function($params, $next) use ($conditions, $handler) {
244 $wrap = static::$_exceptionHandler;
245
246 try {
247 return $next($params);
248 } catch (Throwable $e) {
249 if (!static::matches($e, $conditions)) {
250 throw $e;
251 }
252 return $handler($wrap($e, true), $params);
-
lithium\aop\Chain::__invoke()
/var/app/current/libraries/lithium/aop/Chain.php: 142
137 * @return mixed The return value of the next filter. If there is no
138 * next filter, the return value of the implementation.
139 */
140 public function __invoke(array $params) {
141 if (($filter = next($this->_filters)) !== false) {
142 return $filter($params, $this);
143 }
144
145 $implementation = $this->_implementation;
146 return $implementation($params);
147 }
-
/var/app/current/app/config/bootstrap/environment.php::{closure} @ 38
/var/app/current/app/config/bootstrap/environment.php: 67
62
63 if (!Environment::is('production') && function_exists('apc_clear_cache')) {
64 apc_clear_cache();
65 }
66
67 return $next($params);
68 });
-
lithium\aop\Chain::__invoke()
/var/app/current/libraries/lithium/aop/Chain.php: 142
137 * @return mixed The return value of the next filter. If there is no
138 * next filter, the return value of the implementation.
139 */
140 public function __invoke(array $params) {
141 if (($filter = next($this->_filters)) !== false) {
142 return $filter($params, $this);
143 }
144
145 $implementation = $this->_implementation;
146 return $implementation($params);
147 }
-
/var/app/current/app/config/bootstrap/environment.php::{closure} @ 25
/var/app/current/app/config/bootstrap/environment.php: 33
28
29 if (!Environment::is('production') && function_exists('apc_clear_cache')) {
30 apc_clear_cache();
31 }
32
33 return $next($params);
34 });
35
36 \lithium\aop\Filters::apply('\lithium\action\Dispatcher','run', function( $params, $next) {
37
38 Environment::is(function($request) {
-
lithium\aop\Chain::run()
/var/app/current/libraries/lithium/aop/Chain.php: 113
108 */
109 public function run(array $params, $implementation) {
110 $this->_implementation = $implementation;
111
112 $filter = reset($this->_filters);
113 $result = $filter($params, $this);
114
115 $this->_implementation = null;
116 return $result;
117 }
118
-
lithium\aop\Filters::run()
/var/app/current/libraries/lithium/aop/Filters.php: 231
226 */
227 public static function run($class, $method, array $params, $implementation) {
228 if (!static::hasApplied($class, $method)) {
229 return $implementation($params);
230 }
231 return static::_chain($class, $method)->run($params, $implementation);
232 }
233
234 /**
235 * Clears filters optionally constrained by class or class and method combination.
236 *
-
lithium\action\Dispatcher::run()
/var/app/current/libraries/lithium/action/Dispatcher.php: 154
149 * @filter Allows to perform actions very early or late in the request.
150 */
151 public static function run($request, array $options = []) {
152 $params = compact('request', 'options');
153
154 return Filters::run(get_called_class(), __FUNCTION__, $params, function($params) {
155 $router = static::$_classes['router'];
156
157 $request = $params['request'];
158 $options = $params['options'];
159
-
[main]
/var/app/current/www/index.php: 73
68 ];
69
70 Environment::set(Environment::get(), ['domain' => $domain[Environment::get()]]);
71
72 if (preg_match('/^\/(' . implode('|', $li3) . ')/', $_SERVER['REQUEST_URI'])) {
73 echo \lithium\action\Dispatcher::run($request);
74 } elseif (preg_match('/\/api/', $_SERVER['REQUEST_URI'])) {
75 echo \lithium\action\Dispatcher::run($request);
76 } elseif (preg_match('/\/test\//', $_SERVER['REQUEST_URI'])) {
77 echo \lithium\action\Dispatcher::run($request);
78 } else {