PHP 클래스 PhpSandbox\SandboxedString

This class wraps sandboxed strings to intercept and check callable invocations
저자: Elijah Horton ([email protected])
상속: implements ArrayAccess, implements IteratorAggregate
파일 보기 프로젝트 열기: Corveda/PHPSandbox

공개 메소드들

메소드 설명
__construct ( string $value, PHPSandbox $sandbox ) Constructs the SandboxedString
__invoke ( ) : mixed | null Checks the string value against the sandbox function whitelists and blacklists for callback violations
__toString ( ) : string Returns the original string value
getIterator ( ) : ArrayIterator Return iterator for string value
offsetExists ( mixed $offset ) : boolean Check if specified offset exists in string value
offsetGet ( mixed $offset ) : string Get string value at specified offset
offsetSet ( mixed $offset, mixed $value ) Set string value at specified offset
offsetUnset ( mixed $offset ) Unset string value at specified offset

메소드 상세

__construct() 공개 메소드

Constructs the SandboxedString
public __construct ( string $value, PHPSandbox $sandbox )
$value string Original string value
$sandbox PHPSandbox The current sandbox instance to test against

__invoke() 공개 메소드

Checks the string value against the sandbox function whitelists and blacklists for callback violations
public __invoke ( ) : mixed | null
리턴 mixed | null

__toString() 공개 메소드

Returns the original string value
public __toString ( ) : string
리턴 string

getIterator() 공개 메소드

Return iterator for string value
public getIterator ( ) : ArrayIterator
리턴 ArrayIterator Array iterator to return

offsetExists() 공개 메소드

Check if specified offset exists in string value
public offsetExists ( mixed $offset ) : boolean
$offset mixed Offset to check
리턴 boolean Return true if offset exists, false otherwise

offsetGet() 공개 메소드

Get string value at specified offset
public offsetGet ( mixed $offset ) : string
$offset mixed Offset to get value
리턴 string Value to return

offsetSet() 공개 메소드

Set string value at specified offset
public offsetSet ( mixed $offset, mixed $value )
$offset mixed Offset to set value
$value mixed Value to set

offsetUnset() 공개 메소드

Unset string value at specified offset
public offsetUnset ( mixed $offset )
$offset mixed Offset to unset