/**
  * Runs pre process tasks/scripts
  */
 protected function preProcess()
 {
     switch (count($this->resourceArray)) {
         case 0:
             parent::preProcess();
             break;
         case 1:
             // Try the generic table event
             /** @noinspection PhpUnusedLocalVariableInspection */
             $results = \Event::fire(new ResourcePreProcess($this->getServiceName(), $this->getFullPathName('.') . '.{table_name}', $this->request, $this->resourcePath));
             // Try the actual table name event
             /** @noinspection PhpUnusedLocalVariableInspection */
             $results = \Event::fire(new ResourcePreProcess($this->getServiceName(), $this->getFullPathName('.') . '.' . $this->resourceArray[0], $this->request, $this->resourcePath));
             break;
         case 2:
             // Try the generic table event
             /** @noinspection PhpUnusedLocalVariableInspection */
             $results = \Event::fire(new ResourcePreProcess($this->getServiceName(), $this->getFullPathName('.') . '.{table_name}.{id}', $this->request, $this->resourcePath));
             // Try the actual table name event
             /** @noinspection PhpUnusedLocalVariableInspection */
             $results = \Event::fire(new ResourcePreProcess($this->getServiceName(), $this->getFullPathName('.') . '.' . $this->resourceArray[0] . '.' . $this->resourceArray[1], $this->request, $this->resourcePath));
             break;
         default:
             // Do nothing is all we got?
             break;
     }
 }