PHP Classes

File: kernel/coreArrays.php

Recommend this page to a friend!
  Classes of ASCOOS CMS   Ascoos Framework   kernel/coreArrays.php  
File: kernel/coreArrays.php
Role: Class source
Content type: text/plain
Description: Class Arrays Handles source
Class: Ascoos Framework
Framework of general purposes classes
Author: By
Last change: - `TArrayHandler` :
- `__construct` : In the **commercial edition**, an argument supporting report handling has been added.

```php
public function __construct(array $array = [], array $properties = [], ?TLoggerHandler $logger = null)
```

- `getInstance` : An instance method has been added to the class. In the **commercial edition**, an argument supporting report handling has been added.

```php
public static function &getInstance(array $array, array $properties = [], ?TLoggerHandler $logger = null)
```

- `fromJSON` :
1. Added the `depth` argument for dynamic selection of the maximum nesting depth for JSON decoding. Default: 512.

```php
public function fromJSON(string $json, ?string $key = null, int $depth = 512): bool
```
2. The character encoding of retrieved JSON file content is now UTF8.

- `fromJSONFile` :
1. Added the `depth` argument for dynamic selection of the maximum nesting depth for JSON decoding. Default: 512.

```php
public function fromJSONFile(string $filePath, ?string $key = null, int $depth = 512): bool
```

- `toJSON` :
1. Fixed storage error in JSON files when saving UTF8 characters.
2. Added the `$array` argument for supporting an external array. If not provided, it returns the internal array `$this->array`.

```php
public function toJSON(?array $array = null): string
```
3. Added new functionality.

- `toJSONFile` :
1. Added the `$array` argument for external array selection. If not provided, it returns the internal array `$this->array`.

```php
public function toJSONFile(string $filePath, ?array $array = null)
```
Date: 5 days ago
Size: 166,075 bytes

You need to be a registered user and login to get this file.

Login Immediately with your account on: