PHP Doku:: The Judy class - class.judy.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige GrunderweiterungenJudy ArraysThe Judy class

Ein Service von Reinhard Neidl - Webprogrammierung.

Judy Arrays

<<Ressource-Typen

Judy::byCount>>


UnterSeiten:

The Judy class

Einführung

The Judy class implements the ArrayAccess interface and the Iterator interface. This class, once instantiated, can be accessed like a PHP array.

A PHP Judy object (or Judy Array) can be one of the following type :

Beispiel #1 Judy array example

<?php
    $judy 
= new Judy(Judy::INT_TO_MIXED);
    
$judy[1] = "one";
    
$judy[2] = array('a''b''c');
    
$judy[3] = new Judy(Judy::BITSET);
?>

Klassenbeschreibung

Judy implements ArrayAccess , Iterator {
/* Constants */
const integer Judy::BITSET = 1 ;
const integer Judy::INT_TO_INT = 2 ;
const integer Judy::INT_TO_MIXED = 3 ;
const integer Judy::STRING_TO_INT = 4 ;
const integer Judy::STRING_TO_MIXED = 5 ;
/* Methoden */
public void byCount ( integer $nth_index )
public Judy __construct ( integer $judy_type )
public void count ([ string $index_start [, string $index_end ]] )
public void __destruct ( void )
public mixed first ( mixed $index )
public mixed firstEmpty ( mixed $index )
public void free ( void )
public integer getType ( void )
public void last ( string $index )
public mixed lastEmpty ( mixed $index )
public integer memoryUsage ( void )
public mixed next ( mixed $index )
public mixed nextEmpty ( mixed $index )
public bool offsetExists ( mixed $offset )
public mixed offsetGet ( mixed $offset )
public void offsetSet ( mixed $offset , mixed $value )
public void offsetUnset ( mixed $offset )
public mixed prev ( mixed $index )
public mixed prevEmpty ( mixed $index )
public void size ( void )
}

Vordefinierte Konstanten

Judy Node Types

Judy::BITSET

Define the Judy Array as a Bitset with keys as Integer and Values as a Boolean

Judy::INT_TO_INT

Define the Judy Array with key/values as Integer, and Integer only.

Judy::INT_TO_MIXED

Define the Judy Array with keys as Integer and Values of any type.

Judy::STRING_TO_INT

Define the Judy Array with keys as a String and Values as Integer, and Integer only.

Judy::STRING_TO_MIXED

Define the Judy Array with keys as a String and Values of any type.

Inhaltsverzeichnis


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)