PHP Classes

File: README-EL.md

Recommend this page to a friend!
  Packages of Christos Drogidis   TCollection   README-EL.md   Download  
File: README-EL.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: TCollection
Examples of processing collections of objects
Author: By
Last change:
Date: 3 months ago
Size: 2,420 bytes
 

Contents

Class file image Download

ASCOOS OS ? TCollection

??? ???????, object?only Deep Core ????? ???????? ??? ?? ASCOOS Web Operating System.

Ascoos

??????????

? TCollection ????? Deep Core ????? ??? ASCOOS OS Kernel. ??????? ??? ????, ??????????, ???chainable ??????? ??? ?????????? ???? ??????????? (??? arrays, ??? scalars).

??????????? ??? ????? ???? ?????? ??? ??? ??????????????? ??? ??????????? ????????, object?based ???????? ?? ??????????? ??????? ?????.

????????:

  • ArrayAccess
  • Countable
  • IteratorAggregate
  • JsonSerializable

??????????????

  • ? ?????????? ???? ???????????
  • ? ??????????? ??????? ??????? ????? (`instanceof`)
  • ? Array?like ????????
  • ? ???????????, mapping, grouping
  • ? diff() & intersect()
  • ? JSON serialization
  • ? Deep Core Kernel class (????? ?????????)
  • ? ?????? ?????????? ?? DoBu

??? ???????? ???????/data ?????????????? ??? TArrayHandler.

Namespace

use Ascoos\OS\Kernel\Core\Collections\TCollection;

?????? ??????????

$users = new TCollection();

$user = new stdClass();
$user->name = '???????';

$users->add($user);

echo $users->count(); // 1

????????????? ???????? (???? TCollector)

use Ascoos\OS\Kernel\Core\Collections\TCollector;

TCollector::register('user', App\Models\User::class);

$users = TCollector::create('user');

$users->add(new User()); // OK

??????????

? ?????? ?????????? (???????, ??????????, ????????????, DoBu) ????????? ???? ??????? ?????????? ??? ASCOOS OS.

????? ??????

AGL (Ascoos General License)

??????????

????????? ??????? ?????????? ??? ASCOOS OS https://www.ascoos.com