previousPEAR::getStaticProperty() (Previous) (Next) PEAR::isError()next

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

PEAR::registerShutdownFunc()

PEAR::registerShutdownFunc() – fija una función para la finalización de clases estáticas (package developer related)

Synopsis

require_once 'PEAR.php';

void PEAR::registerShutdownFunc ( array $func , array $var = array() )

Description

La función indicada será llamada antes de que el intérprete de PHP sea finalizado.

Parameter

  • array $func - el nombre de la clase y de la función a llamar.

  • array $var - posibles parámetros requeridos por la función. Los parámetros son pasados a la función de acuerdo con su sucesión en el array.

Example

Usando registerShutdownFunc()

<?php

require_once 'PEAR.php';

class 
myClass {

function 
myClass() 
{
 
PEAR::registerShutdownFunc(array('myClass''shutdown'), 
                            array(
'param1''param2'));
}

function 
shutdown$param1$param2)
{
 
// do something before we will die
}

}

?>
previousPEAR::getStaticProperty() (Previous) (Next) PEAR::isError()next

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.