vendor/mondator/src/Mandango/Mondator/Extension.php
author ymh <ymh.work@gmail.com>
Fri, 09 Dec 2011 04:53:56 +0100
changeset 56 84ce711288ca
parent 18 c85b9d1ddf19
permissions -rw-r--r--
add relaunch wp

<?php

/*
 * This file is part of Mandango.
 *
 * (c) Pablo Díez <pablodip@gmail.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Mandango\Mondator;

/**
 * Extension is the base class for extensions.
 *
 * @author Pablo Díez <pablodip@gmail.com>
 *
 * @api
 */
abstract class Extension extends ClassExtension
{
    /**
     * Pre global process of the extension.
     *
     * @param \ArrayObject                $configClasses The config classes.
     * @param Mandango\Mondator\Container $container     The global container.
     *
     * @api
     */
    public function preGlobalProcess(\ArrayObject $configClasses, Container $container)
    {
        $this->configClasses = $configClasses;
        $this->definitions = $container;

        $this->doPreGlobalProcess();

        $this->configClasses = null;
        $this->definitions = null;
    }

    /**
     * Do the pre global process.
     *
     * @api
     */
    protected function doPreGlobalProcess()
    {
    }

    /**
     * Post global process of the extension.
     *
     * @param \ArrayObject                $configClasses The config classes.
     * @param Mandango\Mondator\Container $container     The global container.
     *
     * @api
     */
    public function postGlobalProcess(\ArrayObject $configClasses, Container $container)
    {
        $this->configClasses = $configClasses;
        $this->definitions = $container;

        $this->doPostGlobalProcess();

        $this->configClasses = null;
        $this->definitions = null;
    }

    /**
     * Do the post global process.
     *
     * @api
     */
    protected function doPostGlobalProcess()
    {
    }
}