Ouzo\ContentType::value PHP Method

value() public static method

public static value ( )
    public static function value()
    {
        self::$contentType = self::$contentType ?: self::getFromServer();
        return self::$contentType;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @test
  */
 public function shouldSetContentType()
 {
     //given
     $_SERVER['CONTENT_TYPE'] = 'application/json';
     //when
     ContentType::set('text/plain');
     //then
     $this->assertEquals('text/plain', ContentType::value());
 }
All Usage Examples Of Ouzo\ContentType::value