Skip to content

ascoos/tcollection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCOOS OS – TCollection

A lightweight, object‑only Deep Core collection class for the ASCOOS Web Operating System.

Ascoos


Overview

TCollection is a Deep Core class of the ASCOOS OS Kernel.
It provides a simple, predictable, non‑chainable collection structure that stores only objects (not arrays, not scalars).

It is designed for internal Kernel usage and for developers who need strict, object‑based collections with optional type enforcement.

Implements:

  • ArrayAccess
  • Countable
  • IteratorAggregate
  • JsonSerializable

Features

  • ✔ Stores only objects
  • ✔ Optional strict type enforcement (instanceof)
  • ✔ Array‑like access
  • ✔ Filtering, mapping, grouping
  • ✔ diff() & intersect()
  • ✔ JSON serialization
  • ✔ Deep Core Kernel class (always loaded)
  • ✔ Fully documented with DoBu

For array/data manipulation, use TArrayHandler instead.


Namespace

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

Basic Example

$users = new TCollection();

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

$users->add($user);

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

Typed Collections (via TCollector)

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

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

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

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

Documentation

Full documentation (methods, parameters, examples, DoBu blocks) is available on the official ASCOOS OS website.


License

AGL (Ascoos General License)


Author

Drogidis Christos
Creator of ASCOOS OS
https://www.ascoos.com

About

A simple, non-chainable collection class for managing items/objects.

Topics

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.md
Unknown
LICENSE-EL.md

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages