本文整理汇总了PHP中fRequest::isPost方法的典型用法代码示例。如果您正苦于以下问题:PHP fRequest::isPost方法的具体用法?PHP fRequest::isPost怎么用?PHP fRequest::isPost使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fRequest
的用法示例。
在下文中一共展示了fRequest::isPost方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateHiddens
private function generateHiddens(WpTesting_Model_Step $step)
{
$hiddens = array();
$hiddens['passer_action'] = $step->isLast() ? WpTesting_Doer_TestPasser::ACTION_PROCESS_FORM : WpTesting_Doer_TestPasser::ACTION_FILL_FORM;
if (!fRequest::isPost()) {
return $hiddens;
}
unset($_POST['passer_action']);
foreach ($_POST as $key => $value) {
if (!is_array($value)) {
$hiddens[$key] = $value;
continue;
}
foreach ($value as $index => $subValue) {
$hiddens["{$key}[{$index}]"] = $subValue;
}
}
return $hiddens;
}
示例2: catch
//fURL::redirect($manage_url);
}
} catch (fNotFoundException $e) {
fMessaging::create('error', $manage_url, 'The check requested, ' . fHTML::encode($check_id) . ', could not be found');
fURL::redirect($manage_url);
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
include VIEW_PATH . '/ackAll_results.php';
} else {
if ($action == 'notifyAll') {
try {
$check = new Check($check_id);
$subject_mail = fRequest::get('subject_mail');
$content_mail = fRequest::get('content_mail');
if (fRequest::isPost()) {
if (empty($subject_mail) || empty($content_mail)) {
fMessaging::create('error', fURL::get(), "You have to fill the subject and the content to send this mail");
} else {
fRequest::validateCSRFToken(fRequest::get('token'));
$recipients = array();
$id_user_session = fSession::get('user_id');
$user_session = new User($id_user_session);
$recipients[] = array("mail" => $user_session->getEmail(), "name" => $user_session->getUsername());
$alt_ids = array();
$subscription_alt = Subscription::findAll($check_id, NULL, NULL, NULL, TRUE);
foreach ($subscription_alt as $alt) {
$user = new User($alt->getUserId());
$recipients[] = array("mail" => usr_var('alt_email', $user->getUserId()), "name" => $user->getUsername());
$alt_ids[] = $alt->getUserId();
}
示例3: Consumable
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Print Master. If not, see <http://www.gnu.org/licenses/>.
*/
// Include initialisation file
include_once 'inc/core.php';
// Get parameters
$redirect = fRequest::get('redirect', 'string');
$consumable_id = fRequest::get('consumable_id', 'integer?');
$qty = fRequest::get('qty');
$cost = fRequest::get('cost', 'float?');
// Determine status - show page or update stock
if (fRequest::isPost() && $consumable_id != NULL) {
// Increase stock
try {
// Get objects matching the printer/consumable
$consumable = new Consumable($consumable_id);
// Update cost if present
if ($cost) {
$consumable->setCost($cost);
$consumable->store();
}
// Update consumable
$updated = $consumable->increaseStockBy($qty);
#die(var_export($updated));
// Check status of installation
if ($updated == FALSE) {
fMessaging::create('error', $redirect, $consumable->err);
示例4: isPost
protected function isPost()
{
return fRequest::isPost();
}