Skip to content

Commit

Permalink
Merge pull request #4 from haomaro/patch-4
Browse files Browse the repository at this point in the history
Update CFSolicitud.php
  • Loading branch information
webcol committed Apr 6, 2016
2 parents b073e52 + 0b2afd0 commit cb660eb
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions Sistema/Nucleo/CFSolicitud.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,25 @@ public function __construct() {
$url = explode('/', $url);
$url = array_filter($url);

$this->_controlador = strtolower(array_shift($url));
$this->_metodo = strtolower(array_shift($url));
$this->_argumentos = $url;
//$this->_controlador = strtolower(array_shift($url));
//$this->_metodo = strtolower(array_shift($url));
//$this->_argumentos = $url;

$this->setControlador(strtolower(array_shift($url)));
$this->setMetodo(strtolower(array_shift($url)));
$this->setArgumentos($url);
}

if(!$this->_controlador){
$this->_controlador = CONTROLADOR_INICIAL;
if(!$this->getControlador()){
$this->setControlador(CONTROLADOR_INICIAL);
}

if(!$this->_metodo){
$this->_metodo = 'index';
if(!$this->getMetodo()){
$this->setMetodo('index');
}

if(!isset($this->_argumentos)){
$this->_argumentos = array();
if(!isset($this->getArgumentos())){
$this->setArgumentos(array());
}
}

Expand All @@ -69,4 +73,19 @@ public function getArgumentos()
{
return $this->_argumentos;
}

public function setControlador($controlador)
{
return $this->_controlador=$controlador;
}

public function setMetodo($metodo)
{
return $this->_metodo=$metodo;
}

public function setArgumentos($argumento)
{
return $this->_argumentos=$argumento;
}
}

0 comments on commit cb660eb

Please sign in to comment.