Back to index

php5  5.3.10
Functions | Variables
spl_heap.h File Reference
#include "php.h"
#include "php_spl.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 PHP_MINIT_FUNCTION (spl_heap)

Variables

PHPAPI zend_class_entry * spl_ce_SplHeap
PHPAPI zend_class_entry * spl_ce_SplMinHeap
PHPAPI zend_class_entry * spl_ce_SplMaxHeap
PHPAPI zend_class_entry * spl_ce_SplPriorityQueue

Function Documentation

PHP_MINIT_FUNCTION ( spl_heap  )

Definition at line 1211 of file spl_heap.c.

{
       REGISTER_SPL_STD_CLASS_EX(SplHeap, spl_heap_object_new, spl_funcs_SplHeap);
       memcpy(&spl_handler_SplHeap, zend_get_std_object_handlers(), sizeof(zend_object_handlers));

       spl_handler_SplHeap.clone_obj      = spl_heap_object_clone;
       spl_handler_SplHeap.count_elements = spl_heap_object_count_elements;
       spl_handler_SplHeap.get_debug_info = spl_heap_object_get_debug_info;

       REGISTER_SPL_IMPLEMENTS(SplHeap, Iterator);
       REGISTER_SPL_IMPLEMENTS(SplHeap, Countable);

       spl_ce_SplHeap->get_iterator = spl_heap_get_iterator;

       REGISTER_SPL_SUB_CLASS_EX(SplMinHeap,           SplHeap,        spl_heap_object_new, spl_funcs_SplMinHeap);
       REGISTER_SPL_SUB_CLASS_EX(SplMaxHeap,           SplHeap,        spl_heap_object_new, spl_funcs_SplMaxHeap);

       spl_ce_SplMaxHeap->get_iterator = spl_heap_get_iterator;
       spl_ce_SplMinHeap->get_iterator = spl_heap_get_iterator;

       REGISTER_SPL_STD_CLASS_EX(SplPriorityQueue, spl_heap_object_new, spl_funcs_SplPriorityQueue);
       memcpy(&spl_handler_SplPriorityQueue, zend_get_std_object_handlers(), sizeof(zend_object_handlers));

       spl_handler_SplPriorityQueue.clone_obj      = spl_heap_object_clone;
       spl_handler_SplPriorityQueue.count_elements = spl_heap_object_count_elements;
       spl_handler_SplPriorityQueue.get_debug_info = spl_pqueue_object_get_debug_info;

       REGISTER_SPL_IMPLEMENTS(SplPriorityQueue, Iterator);
       REGISTER_SPL_IMPLEMENTS(SplPriorityQueue, Countable);

       spl_ce_SplPriorityQueue->get_iterator = spl_pqueue_get_iterator;

       REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_BOTH",      SPL_PQUEUE_EXTR_BOTH);
       REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_PRIORITY",  SPL_PQUEUE_EXTR_PRIORITY);
       REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_DATA",      SPL_PQUEUE_EXTR_DATA);

       return SUCCESS;
}

Here is the call graph for this function:


Variable Documentation

PHPAPI zend_class_entry* spl_ce_SplHeap

Definition at line 47 of file spl_heap.c.

PHPAPI zend_class_entry* spl_ce_SplMaxHeap

Definition at line 48 of file spl_heap.c.

PHPAPI zend_class_entry* spl_ce_SplMinHeap

Definition at line 49 of file spl_heap.c.

PHPAPI zend_class_entry* spl_ce_SplPriorityQueue

Definition at line 50 of file spl_heap.c.