# cookiebot/3.11.2/addons/inc/Dependencies/DI/Scope.php

Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA &amp; Google Consent Mode, version 3.11.2. 55 lines.

- Page: https://pluginprobe.com/plugins/cookiebot/3.11.2/code/addons/inc/Dependencies/DI/Scope.php
- Raw: https://pluginprobe.com/plugins/cookiebot/3.11.2/raw/addons/inc/Dependencies/DI/Scope.php
- Modified: 2021-03-23T11:49:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/cookiebot/3.11.2/code/addons/inc/Dependencies/DI/Scope.php#L10-L20`.

```php
<?php
/**
 * PHP-DI
 *
 * @link      http://php-di.org/
 * @copyright Matthieu Napoli (http://mnapoli.fr/)
 * @license   http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
 */

namespace Cybot\Dependencies\DI;

/**
 * Scope enum.
 *
 * The scope defines the lifecycle of an entry.
 *
 * @author Matthieu Napoli <matthieu@mnapoli.fr>
 */
class Scope
{
    /**
     * A singleton entry will be computed once and shared.
     *
     * For a class, only a single instance of the class will be created.
     */
    const SINGLETON = 'singleton';

    /**
     * A prototype entry will be recomputed each time it is asked.
     *
     * For a class, this will create a new instance each time.
     */
    const PROTOTYPE = 'prototype';

    /**
     * Method kept for backward compatibility, use the constant instead.
     *
     * @return string
     */
    public static function SINGLETON()
    {
        return self::SINGLETON;
    }

    /**
     * Method kept for backward compatibility, use the constant instead.
     *
     * @return string
     */
    public static function PROTOTYPE()
    {
        return self::PROTOTYPE;
    }
}

```
