SILENT KILLERPanel

Current Path: > > opt > cloudlinux > alt-php55 > root > usr > share > > doc > pear > Base > docs


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/alt-php55/root/usr/share//doc/pear/Base/docs

NameTypeSizeLast ModifiedActions
repos Directory - -
CREDITS File 229 bytes December 18 2019 11:18:59.
LICENSE File 1570 bytes December 18 2019 11:18:59.
tutorial.txt File 8799 bytes December 18 2019 11:18:59.
tutorial_autoload.php File 495 bytes December 18 2019 11:18:59.
tutorial_example_01.php File 215 bytes December 18 2019 11:18:59.
tutorial_example_02.php File 189 bytes December 18 2019 11:18:59.
tutorial_example_03.php File 107 bytes December 18 2019 11:18:59.
tutorial_example_04.php File 1424 bytes December 18 2019 11:18:59.
tutorial_lazy_initialization.php File 914 bytes December 18 2019 11:18:59.

Reading File: //opt/cloudlinux/alt-php55/root/usr/share//doc/pear/Base/docs/tutorial_lazy_initialization.php

<?php
require_once 'tutorial_autoload.php';

// Create a custom class implementing the singleton pattern
class customSingleton
{
    protected static $instance;

    public static function getInstance()
    {
        if ( self::$instance === null )
        {
            self::$instance = new customSingleton();
            ezcBaseInit::fetchConfig( 'customKey', self::$instance );
        }

        return self::$instance;
    }
}

// Implement your configuration class
class customSingletonConfiguration implements ezcBaseConfigurationInitializer
{
    public static function configureObject( $object )
    {
        echo "Configure customSingleton.\n";
        $object->value = 42;
    }
}

// Register for lazy initilization
ezcBaseInit::setCallback( 'customKey', 'customSingletonConfiguration' );

// Configure on first initilization
$object = customSingleton::getInstance();
var_dump( $object->value );

?>

SILENT KILLER Tool