# betterdocs/4.9.2/includes/Dependencies/DI/Annotation/Injectable.php

BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ &amp; Chatbot, version 4.9.2. 43 lines.

- Page: https://pluginprobe.com/plugins/betterdocs/4.9.2/code/includes/Dependencies/DI/Annotation/Injectable.php
- Raw: https://pluginprobe.com/plugins/betterdocs/4.9.2/raw/includes/Dependencies/DI/Annotation/Injectable.php
- Modified: 2023-08-14T08:41:14+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/betterdocs/4.9.2/code/includes/Dependencies/DI/Annotation/Injectable.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace WPDeveloper\BetterDocs\Dependencies\DI\Annotation;

/**
 * "Injectable" annotation.
 *
 * Marks a class as injectable
 *
 * @api
 *
 * @Annotation
 * @Target("CLASS")
 *
 * @author Domenic Muskulus <domenic@muskulus.eu>
 * @author Matthieu Napoli <matthieu@mnapoli.fr>
 */
final class Injectable
{
    /**
     * Should the object be lazy-loaded.
     * @var bool|null
     */
    private $lazy;

    public function __construct(array $values)
    {
        if (isset($values['lazy'])) {
            $this->lazy = (bool) $values['lazy'];
        }
    }

    /**
     * @return bool|null
     */
    public function isLazy()
    {
        return $this->lazy;
    }
}

```
