Skip to content

Commit

Permalink
Parameters->post() - default get all
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Pospisil committed Apr 1, 2017
1 parent 632b545 commit 0fc1572
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Parameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ public function post($key = NULL, $isRequired = FALSE, array $validators = array
$return = isset($post[$key]) ? $post[$key] : null;
else
$return = $post;
} else
$return = $this->request->getPost($key);
} else {
if($key)
$return = $this->request->getPost($key);
else
$return = $this->request->getPost();
}

$return = $this->validator->validate($key, $isRequired, $validators, $return);
return $return;
}
Expand Down

0 comments on commit 0fc1572

Please sign in to comment.