isGet() публичный статический Метод

Is this a GET method request?
public static isGet ( ) : boolean
Результат boolean
Пример #1
0
 /**
  * Test `Is` Methods
  */
 public function testIsMethods()
 {
     $this->assertTrue(Request::isGet());
     $this->assertFalse(Request::isPost());
     $this->assertFalse(Request::isPut());
     $this->assertFalse(Request::isDelete());
     $this->assertFalse(Request::isFlashRequest());
     $this->assertFalse(Request::isXmlHttpRequest());
 }
Пример #2
0
<?php

namespace Application;

use Bluz\Proxy\Messages;
use Bluz\Proxy\Request;
use Application\Menu;
use Bluz\Db\Exception\RelationNotFoundException;
use Bluz\Proxy\Layout;
use Bluz\Proxy\Session;
return function ($dishId) use($view) {
    $dish = Menu\Table::findRow($dishId);
    if (Request::isGet()) {
        try {
            $view->unusedMedia = DishesMedia\Table::getUnusedMedia();
            //media for current dish
            $view->dishMedia = $dish->getRelations('Media');
        } catch (RelationNotFoundException $e) {
            $view->dishMedia = array();
        }
    }
};