◆ __construct()
__construct |
( |
|
$size, |
|
|
|
$convert = false |
|
) |
| |
23 parent::__construct($size);
24 $this->convert = (bool) $convert;
◆ __toString()
◆ chunk()
chunk |
( |
|
$start, |
|
|
|
$size, |
|
|
|
$normalize = true |
|
) |
| |
28 $end = $start + $size;
29 if($normalize and $this->convert){
31 for($i = $start; $i < $end; ++$i){
36 for($i = $start; $i < $end; ++$i){
◆ fromString()
static fromString |
( |
|
$str, |
|
|
|
$convert = false |
|
) |
| |
|
static |
- Parameters
-
- Returns
- SplFixedByteArray
54 for($i = 0; $i < $len; ++$i){
55 $ob[$i] = ord($str{$i});
58 for($i = 0; $i < $len; ++$i){
◆ fromStringChunk()
static fromStringChunk |
( |
|
$str, |
|
|
|
$size, |
|
|
|
$start = 0 , |
|
|
|
$convert = false |
|
) |
| |
|
static |
- Parameters
-
string | $str | |
int | $size | |
int | $start | |
bool | $convert | |
- Returns
- SplFixedByteArray
78 for($i = 0; $i < $size; ++$i){
79 $ob[$i] = ord($str{$i + $start});
82 for($i = 0; $i < $size; ++$i){
83 $ob[$i] = $str{$i + $start};
◆ toString()
93 for($i = 0; $i < $this->getSize(); ++$i){
94 $result .= chr($this[$i]);
97 for($i = 0; $i < $this->getSize(); ++$i){
The documentation for this class was generated from the following file:
- src/spl/SplFixedByteArray.php