PHP 클래스 Magic

This method is slower than determining the type by file suffix but on the other hand reduces the risk of fail positives during the test. The magic file consists of ASCII characters defining the magic numbers for different file types. Each row has 4 to 5 columns, empty and commented lines (those starting with a hash character) are ignored. Columns are described below. o 1 -- byte number to begin checking from. ">" indicates a dependency upon the previous non-">" line o 2 -- type of data to match. Can be one of following - byte (single character) - short (machine-order 16-bit integer) - long (machine-order 32-bit integer) - string (arbitrary-length string) - date (long integer date (seconds since Unix epoch/1970)) - beshort (big-endian 16-bit integer) - belong (big-endian 32-bit integer) - bedate (big-endian 32-bit integer date) - leshort (little-endian 16-bit integer) - lelong (little-endian 32-bit integer) - ledate (little-endian 32-bit integer date) o 3 -- contents of data to match o 4 -- file description/MIME type if matched o 5 -- optional MIME encoding if matched and if above was a MIME type
저자: Sven Vollbehr ([email protected])
파일 보기 프로젝트 열기: bcosca/fatfree-core 1 사용 예제들

공개 메소드들

메소드 설명
__get ( $key ) : mixed Alias for offsetget()
__isset ( $key ) : mixed Alias for offsetexists()
__set ( $key, $val ) : mixed Alias for offsetset()
__unset ( $key ) : null Alias for offsetunset()
clear ( $key ) : null Unset key
exists ( $key ) : boolean Return TRUE if key is not empty
get ( $key ) : mixed Retrieve contents of key
offsetexists ( $key ) : mixed Convenience method for checking property value
offsetget ( $key ) : mixed Convenience method for retrieving property value
offsetset ( $key, $val ) : mixed Convenience method for assigning property value
offsetunset ( $key ) : null Convenience method for removing property value
set ( $key, $val ) : mixed Bind value to key

메소드 상세

__get() 공개 메소드

Alias for offsetget()
public __get ( $key ) : mixed
$key string
리턴 mixed

__isset() 공개 메소드

Alias for offsetexists()
public __isset ( $key ) : mixed
$key string
리턴 mixed

__set() 공개 메소드

Alias for offsetset()
public __set ( $key, $val ) : mixed
$key string
$val scalar
리턴 mixed

__unset() 공개 메소드

Alias for offsetunset()
public __unset ( $key ) : null
$key string
리턴 null

clear() 추상적인 공개 메소드

Unset key
abstract public clear ( $key ) : null
$key string
리턴 null

exists() 추상적인 공개 메소드

Return TRUE if key is not empty
abstract public exists ( $key ) : boolean
$key string
리턴 boolean

get() 추상적인 공개 메소드

Retrieve contents of key
abstract public get ( $key ) : mixed
$key string
리턴 mixed

offsetexists() 공개 메소드

Convenience method for checking property value
public offsetexists ( $key ) : mixed
$key string
리턴 mixed

offsetget() 공개 메소드

Convenience method for retrieving property value
public offsetget ( $key ) : mixed
$key string
리턴 mixed

offsetset() 공개 메소드

Convenience method for assigning property value
public offsetset ( $key, $val ) : mixed
$key string
$val scalar
리턴 mixed

offsetunset() 공개 메소드

Convenience method for removing property value
public offsetunset ( $key ) : null
$key string
리턴 null

set() 추상적인 공개 메소드

Bind value to key
abstract public set ( $key, $val ) : mixed
$key string
$val mixed
리턴 mixed