/var
/www
/vhosts
/canortho.com
/httpdocs
/app
/src
/Controller
/ProductCategoriesController.php
'Categories'
])
->first();
$images = $this->Images->find()
->where(['product_id' => $id])
->where(['enabled ' => true])
->all();
$images = $images->toArray();
$videos = $this->Videos->find()
->where(['product_id' => $id])
->all();
$before = null;
$after = null;
$check = $this->Products->find()
->where(['Products.category_id ' => $product->category_id])
->where(['Products.order < ' => $product->order])
->where(['Products.enabled ' => true])
->order(['Products.order'=> 'DESC'])
->first();
if($check){
$before = $check;
}
$check = $this->Products->find()
->where(['Products.category_id ' => $product->category_id])
->where(['Products.order >' => $product->order])
->where(['Products.enabled ' => true])
->order(['Products.order'=> 'ASC'])
->first();
if($check){
$after = $check;
}
/var
/www
/vhosts
/canortho.com
/httpdocs
/app
/src
/Controller
/ProductCategoriesController.php
'Categories'
])
->first();
$images = $this->Images->find()
->where(['product_id' => $id])
->where(['enabled ' => true])
->all();
$images = $images->toArray();
$videos = $this->Videos->find()
->where(['product_id' => $id])
->all();
$before = null;
$after = null;
$check = $this->Products->find()
->where(['Products.category_id ' => $product->category_id])
->where(['Products.order < ' => $product->order])
->where(['Products.enabled ' => true])
->order(['Products.order'=> 'DESC'])
->first();
if($check){
$before = $check;
}
$check = $this->Products->find()
->where(['Products.category_id ' => $product->category_id])
->where(['Products.order >' => $product->order])
->where(['Products.enabled ' => true])
->order(['Products.order'=> 'ASC'])
->first();
if($check){
$after = $check;
}
/var
/www
/vhosts
/canortho.com
/httpdocs
/app
/Vendor
/cakephp
/cakephp
/lib
/Cake
/Controller
/Controller.php
* Dispatches the controller action. Checks that the action
* exists and isn't private.
*
* @param CakeRequest $request Request instance.
* @return mixed The resulting response.
* @throws PrivateActionException When actions are not public or prefixed by _
* @throws MissingActionException When actions are not defined and scaffolding is
* not enabled.
*/
public function invokeAction(CakeRequest $request) {
try {
$method = new ReflectionMethod($this, $request->params['action']);
if ($this->_isPrivateAction($method, $request)) {
throw new PrivateActionException(array(
'controller' => $this->name . "Controller",
'action' => $request->params['action']
));
}
return $method->invokeArgs($this, $request->params['pass']);
} catch (ReflectionException $e) {
if ($this->scaffold !== false) {
return $this->_getScaffold($request);
}
throw new MissingActionException(array(
'controller' => $this->name . "Controller",
'action' => $request->params['action']
));
}
}
/**
* Check if the request's action is marked as private, with an underscore,
* or if the request is attempting to directly accessing a prefixed action.
*
* @param ReflectionMethod $method The method to be invoked.
* @param CakeRequest $request The request to check.
* @return bool
*/
/var
/www
/vhosts
/canortho.com
/httpdocs
/app
/Vendor
/cakephp
/cakephp
/lib
/Cake
/Routing
/Dispatcher.php
$afterEvent->data['response']->send();
}
/**
* Initializes the components and models a controller will be using.
* Triggers the controller action, and invokes the rendering if Controller::$autoRender
* is true and echo's the output. Otherwise the return value of the controller
* action are returned.
*
* @param Controller $controller Controller to invoke
* @param CakeRequest $request The request object to invoke the controller for.
* @return CakeResponse the resulting response object
*/
protected function _invoke(Controller $controller, CakeRequest $request) {
$controller->constructClasses();
$controller->startupProcess();
$response = $controller->response;
$render = true;
$result = $controller->invokeAction($request);
if ($result instanceof CakeResponse) {
$render = false;
$response = $result;
}
if ($render && $controller->autoRender) {
$response = $controller->render();
} elseif (!($result instanceof CakeResponse) && $response->body() === null) {
$response->body($result);
}
$controller->shutdownProcess();
return $response;
}
/**
* Applies Routing and additionalParameters to the request to be dispatched.
* If Routes have not been loaded they will be loaded, and app/Config/routes.php will be run.
*
* @param CakeEvent $event containing the request, response and additional params
/var
/www
/vhosts
/canortho.com
/httpdocs
/app
/Vendor
/cakephp
/cakephp
/lib
/Cake
/Routing
/Dispatcher.php
$request = $beforeEvent->data['request'];
if ($beforeEvent->result instanceof CakeResponse) {
if (isset($request->params['return'])) {
return $beforeEvent->result->body();
}
$beforeEvent->result->send();
return null;
}
$controller = $this->_getController($request, $response);
if (!($controller instanceof Controller)) {
throw new MissingControllerException(array(
'class' => Inflector::camelize($request->params['controller']) . 'Controller',
'plugin' => empty($request->params['plugin']) ? null : Inflector::camelize($request->params['plugin'])
));
}
$response = $this->_invoke($controller, $request);
if (isset($request->params['return'])) {
return $response->body();
}
$afterEvent = new CakeEvent('Dispatcher.afterDispatch', $this, compact('request', 'response'));
$this->getEventManager()->dispatch($afterEvent);
$afterEvent->data['response']->send();
}
/**
* Initializes the components and models a controller will be using.
* Triggers the controller action, and invokes the rendering if Controller::$autoRender
* is true and echo's the output. Otherwise the return value of the controller
* action are returned.
*
* @param Controller $controller Controller to invoke
* @param CakeRequest $request The request object to invoke the controller for.
* @return CakeResponse the resulting response object
*/
protected function _invoke(Controller $controller, CakeRequest $request) {
/var
/www
/vhosts
/canortho.com
/httpdocs
/index.php
if (php_sapi_name() == 'cli-server') {
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['REQUEST_URI'])) {
return false;
}
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
}
if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) {
$failed = true;
}
if (!empty($failed)) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
App::uses('Dispatcher', 'Routing');
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch(
new CakeRequest(),
new CakeResponse()
);