Skip to content

Instantly share code, notes, and snippets.

@hobodave
Created September 8, 2008 19:39
Show Gist options
  • Save hobodave/9514 to your computer and use it in GitHub Desktop.
Save hobodave/9514 to your computer and use it in GitHub Desktop.
'admin_tickets_path' =>
object(Zend_Controller_Router_Route)[38]
protected '_urlVariable' => string ':' (length=1)
protected '_urlDelimiter' => string '/' (length=1)
protected '_regexDelimiter' => string '#' (length=1)
protected '_defaultRegex' => null
protected '_variables' =>
array
2 => string 'action' (length=6)
protected '_parts' =>
array
0 => string 'admin' (length=5)
1 => string 'tickets' (length=7)
2 => null
3 => string '*' (length=1)
protected '_defaults' =>
array
'module' => string 'admin' (length=5)
'controller' => string 'tickets' (length=7)
'action' => string 'index' (length=5)
protected '_requirements' =>
array
empty
protected '_values' =>
array
'action' => string 'destroy' (length=7)
protected '_wildcardData' =>
array
empty
private '_staticCount' => int 2
<?php
public function destroyAction()
{
$params = $this->_request->getParams();
var_dump($params);
var_dump(Zend_Controller_Front::getInstance()->getRouter()->getRoutes());
die;
if (! ($this->_request->isDelete() || $params['_method'] == 'delete')) {
throw new Sentact_Controller_Exception('Invalid request method for this action');
}
$model = new Admin_Models_Ticket();
$model->deleteById($params['id']);
$this->_redirector->gotoRouteAndExit(array(), 'admin_tickets_path');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment