# danog\MadelineProto\TL\Types\Bytes: Bytes wrapper.

> 
Cast this object to a string ((string) $bytes) to obtain the inner bytes.


[Back to index](../../../../index.html)

> Author: Daniil Gentili <daniil@daniil.it>  
  

Bytes wrapper.  


Cast this object to a string ((string) $bytes) to obtain the inner bytes.



## Method list:
* [`__construct(string $bytes)`](#__construct)
* [`jsonSerialize(): array`](#jsonSerialize)
* [`offsetSet((integer|null) $offset, string $value): void`](#offsetSet)
* [`offsetGet(integer $offset): string`](#offsetGet)
* [`offsetUnset(integer $offset): void`](#offsetUnset)
* [`offsetExists(integer $offset): bool`](#offsetExists)

## Methods:
### <a name="__construct"></a> `__construct(string $bytes)`

Constructor function.


Parameters:

* `$bytes`: `string` Contents  



### <a name="jsonSerialize"></a> `jsonSerialize(): array`

Obtain values for JSON-encoding.



### <a name="offsetSet"></a> `offsetSet((integer|null) $offset, string $value): void`

Set char at offset.


Parameters:

* `$offset`: `(integer|null)` Offset  
* `$value`: `string` Char  



### <a name="offsetGet"></a> `offsetGet(integer $offset): string`

Get char at offset.


Parameters:

* `$offset`: `integer` Name  



### <a name="offsetUnset"></a> `offsetUnset(integer $offset): void`

Unset char at offset.


Parameters:

* `$offset`: `integer` Offset  



### <a name="offsetExists"></a> `offsetExists(integer $offset): bool`

Check if char at offset exists.


Parameters:

* `$offset`: `integer` Offset  



---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
