StaticHandler

A handler for serving static resources from the file system or classpath.

package

Default

Methods

__construct

__construct() 

Create a handler using defaults

create( $arg0 = null) : \io\vertx\jphp\ext\web\handler\StaticHandler
static

create()

Create a handler, specifying web-root

param $root [string] the web-root create($root)

Arguments

$arg0

string

Response

\io\vertx\jphp\ext\web\handler\StaticHandler

the handler

Something has happened, so handle it.

handle( $arg0) : void

Arguments

$arg0

RoutingContext

Enable/Disable access to the root of the filesystem

setAllowRootFileSystemAccess( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Set whether async filesystem access should always be used

setAlwaysAsyncFS( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Set the server cache entry timeout when caching is enabled

setCacheEntryTimeout( $arg0) : $this

Arguments

$arg0

integer

Response

$this

a reference to this, so the API can be used fluently

Set whether cache header handling is enabled

setCachingEnabled( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Set the default content encoding for text related files. This allows overriding the system settings default value.

setDefaultContentEncoding( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this, so the API can be used fluently

Set whether directory listing is enabled

setDirectoryListing( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Set the directory template to be used when directory listing

setDirectoryTemplate( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this, so the API can be used fluently

Set whether async/sync filesystem tuning should enabled

setEnableFSTuning( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Set whether range requests (resumable downloads; media streaming) should be enabled.

setEnableRangeSupport( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Set whether files are read-only and will never change

setFilesReadOnly( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Set the file mapping for http2push and link preload

setHttp2PushMapping( $arg0) : $this

Arguments

$arg0

array

Response

$this

a reference to this, so the API can be used fluently

Set whether hidden files should be served

setIncludeHidden( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Set the index page

setIndexPage( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this, so the API can be used fluently

Set value for max age in caching headers

setMaxAgeSeconds( $arg0) : $this

Arguments

$arg0

integer

Response

$this

a reference to this, so the API can be used fluently

Set the max serve time in ns, above which serves are considered slow

setMaxAvgServeTimeNs( $arg0) : $this

Arguments

$arg0

integer

Response

$this

a reference to this, so the API can be used fluently

Set the max cache size, when caching is enabled

setMaxCacheSize( $arg0) : $this

Arguments

$arg0

integer

Response

$this

a reference to this, so the API can be used fluently

Set whether vary header should be sent with response.

setSendVaryHeader( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Set the web root

setWebRoot( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this, so the API can be used fluently

Skip compression if the media type of the file to send is in the provided <code>mediaTypes</code> set.

skipCompressionForMediaTypes( $arg0) : $this

Content-Encoding header set to identity for the types present in the mediaTypes set

Arguments

$arg0

array

Response

$this

a reference to this, so the API can be used fluently

Skip compression if the suffix of the file to send is in the provided <code>fileSuffixes</code> set.

skipCompressionForSuffixes( $arg0) : $this

Content-Encoding header set to identity for the suffixes present in the fileSuffixes set

Arguments

$arg0

array

Response

$this

a reference to this, so the API can be used fluently

Constants

Default value of the web-root, where files are served from

DEFAULT_WEB_ROOT
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default value of whether files are read -only and never will be updated

DEFAULT_FILES_READ_ONLY
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default max age for cache headers

DEFAULT_MAX_AGE_SECONDS
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default of whether cache header handling is enabled

DEFAULT_CACHING_ENABLED
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default of whether directory listing is enabled

DEFAULT_DIRECTORY_LISTING
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default template file to use for directory listing

DEFAULT_DIRECTORY_TEMPLATE
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default of whether hidden files can be served

DEFAULT_INCLUDE_HIDDEN
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default cache entry timeout, when caching

DEFAULT_CACHE_ENTRY_TIMEOUT
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

The default index page

DEFAULT_INDEX_PAGE
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

The default max cache size

DEFAULT_MAX_CACHE_SIZE
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default of whether async filesystem access should always be used

DEFAULT_ALWAYS_ASYNC_FS
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default of whether fs async/sync tuning should be used

DEFAULT_ENABLE_FS_TUNING
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default max avg serve time, in ns, over which serving will be considered slow

DEFAULT_MAX_AVG_SERVE_TIME_NS
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default of whether Range request handling support should be used

DEFAULT_RANGE_SUPPORT
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default of whether access to the root of the file system should be allowed or just allow from the current working directory.

DEFAULT_ROOT_FILESYSTEM_ACCESS
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default of whether vary header should be sent.

DEFAULT_SEND_VARY_HEADER
var

php文件只是为了写代码方便,常量的实际值请参考原java文件