Overview

Namespaces

  • Kotchasan
    • Cache
    • Database
    • Http
    • Log
    • Orm
  • None
  • PHP
  • Psr
    • Cache
    • Http
      • Message
    • Log

Classes

  • Accordion
  • ApiController
  • ArrayTool
  • CKEditor
  • Collection
  • Config
  • Controller
  • Country
  • Csv
  • Curl
  • Currency
  • Database
  • DataTable
  • Date
  • DOMNode
  • DOMParser
  • Email
  • File
  • Files
  • Form
  • Grid
  • Html
  • Htmldoc
  • HtmlTable
  • Image
  • InputItem
  • Inputs
  • KBase
  • Language
  • ListItem
  • Login
  • Menu
  • Mime
  • Model
  • Number
  • ObjectTool
  • Password
  • Pdf
  • Province
  • Router
  • Session
  • Singleton
  • Tab
  • TableRow
  • Template
  • Text
  • Validator
  • View

Exceptions

  • ApiException
  • InputItemException
  • Overview
  • Namespace
  • Class
  • Tree

Class Collection

Collection Class.

Kotchasan\Collection implements Countable, IteratorAggregate, ArrayAccess
Namespace: Kotchasan
Author: Goragod Wiriya admin@goragod.com
Since: 1.0
Located at Kotchasan/Collection.php
Methods summary
public
# __construct( array $items = array() )

Create new collection.

Create new collection.

Parameters

$items
สมาชิกเริ่มต้นของ Collection
public
# clear( )

ลบข้อมูลทั้งหมด.

ลบข้อมูลทั้งหมด.

public integer
# count( )

คืนค่าจำนวนข้อมูลทั้งหมด.

คืนค่าจำนวนข้อมูลทั้งหมด.

Returns

integer

Implementation of

Countable::count()
public mixed
# get( string $key, mixed $default = null )

อ่านข้อมูลที่ $key ถ้าไม่พบคืนค่า $default.

อ่านข้อมูลที่ $key ถ้าไม่พบคืนค่า $default.

Parameters

$key
$default

Returns

mixed
public ArrayIterator
# getIterator( )

Retrieve an external iterator.

Retrieve an external iterator.

Returns

ArrayIterator

Implementation of

IteratorAggregate::getIterator()
public boolean
# has( string $key )

ตรวจสอบว่ามีรายการ $key หรือไม่.

ตรวจสอบว่ามีรายการ $key หรือไม่.

Parameters

$key

Returns

boolean
public array
# keys( )

อ่านรายชื่อ keys คืนค่าแอเรย์ของรายการ key ทั้งหมด.

อ่านรายชื่อ keys คืนค่าแอเรย์ของรายการ key ทั้งหมด.

Returns

array
public boolean
# offsetExists( string $key )

ตรวจสอบว่ามีรายการ $key หรือไม่.

ตรวจสอบว่ามีรายการ $key หรือไม่.

Parameters

$key

Returns

boolean

Implementation of

ArrayAccess::offsetExists()
public mixed
# offsetGet( string $key )

อ่านข้อมูลที่ $key.

อ่านข้อมูลที่ $key.

Parameters

$key

Returns

mixed

Implementation of

ArrayAccess::offsetGet()
public
# offsetSet( string $key, mixed $value )

กำหนดค่า $value ของ $key.

กำหนดค่า $value ของ $key.

Parameters

$key
$value

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( string $key )

ลบรายการที่ $key.

ลบรายการที่ $key.

Parameters

$key

Implementation of

ArrayAccess::offsetUnset()
public
# remove( string $key )

ลบรายการที่ $key.

ลบรายการที่ $key.

Parameters

$key
public
# replace( array $items )

เพิ่มรายการใหม่ แทนที่รายการเดิม

เพิ่มรายการใหม่ แทนที่รายการเดิม

Parameters

$items
array(array($key => $value), array($key => $value), ...)
public
# set( string $key, mixed $value )

กำหนดค่า $value ของ $key.

กำหนดค่า $value ของ $key.

Parameters

$key
$value
public array
# toArray( )

คืนค่าข้อมูลทั้งหมดเป็น.

คืนค่าข้อมูลทั้งหมดเป็น.

Returns

array
Kotchasan API documentation generated by ApiGen