Created
September 8, 2008 19:39
-
-
Save hobodave/9514 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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