# \PHPSandboxSandboxedString

Sandboxed string class for PHP Sandboxes.

This class wraps sandboxed strings to intercept and check callable invocations

## Summary

Methods
Properties
Constants
__construct()
__toString()
__invoke()
offsetSet()
offsetGet()
offsetExists()
offsetUnset()
getIterator()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$value
$sandbox
N/A

File
  SandboxedString.php
Package
  PHPSandbox
Class hierarchy
  \PHPSandbox\SandboxedString
Implements

## Tags

namespace | PHPSandbox
author | Elijah Horton elijah@corveda.com
version |

## Properties

### $value

    $value : string

Value of the SandboxedString

#### Type

string

#

## Tags

None found

### $sandbox

    $sandbox : \PHPSandbox\PHPSandbox

PHPSandbox instance invoked by the SandboxedString

#### Type

\PHPSandbox\PHPSandbox

#

## Tags

None found

## Methods

### __construct()

    __construct(string  $value, \PHPSandbox\PHPSandbox  $sandbox)

Constructs the SandboxedString

#### Parameters

string | $value | Original string value
\PHPSandbox\PHPSandbox | $sandbox | The current sandbox instance to test against

#

## Tags

None found

### __toString()

    __toString() : string

Returns the original string value

#### Returns

string

#

## Tags

None found

### __invoke()

    __invoke() : mixed|null

Checks the string value against the sandbox function whitelists and blacklists for callback violations

#### Returns

mixed|null

#

## Tags

None found

### offsetSet()

    offsetSet(mixed  $offset, mixed  $value)

Set string value at specified offset

#### Parameters

mixed | $offset | Offset to set value
mixed | $value | Value to set

#

## Tags

None found

### offsetGet()

    offsetGet(mixed  $offset) : string

Get string value at specified offset

#### Parameters

mixed | $offset | Offset to get value

#### Returns

string —

Value to return

#

## Tags

None found

### offsetExists()

    offsetExists(mixed  $offset) : boolean

Check if specified offset exists in string value

#### Parameters

mixed | $offset | Offset to check

#### Returns

boolean —

Return true if offset exists, false otherwise

#

## Tags

None found

### offsetUnset()

    offsetUnset(mixed  $offset)

Unset string value at specified offset

#### Parameters

mixed | $offset | Offset to unset

#

## Tags

None found

### getIterator()

    getIterator() : \ArrayIterator

Return iterator for string value

#### Returns

\ArrayIterator —

Array iterator to return

#

## Tags

None found

### SandboxedString.php