!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/queuepro/vendor/league/commonmark/src/Extension/Attributes/Util/   drwxrwxr-x
Free 13.15 GB of 57.97 GB (22.68%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     AttributesHelper.php (3.63 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the league/commonmark package.
 *
 * (c) Colin O'Dell <colinodell@gmail.com>
 * (c) 2015 Martin HasoĊˆ <martin.hason@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

declare(strict_types=1);

namespace 
League\CommonMark\Extension\Attributes\Util;

use 
League\CommonMark\Node\Node;
use 
League\CommonMark\Parser\Cursor;
use 
League\CommonMark\Util\RegexHelper;

/**
 * @internal
 */
final class AttributesHelper
{
    private const 
REGEX '/^\s*([.#][_a-z0-9-]+|' RegexHelper::PARTIAL_ATTRIBUTENAME RegexHelper::PARTIAL_ATTRIBUTEVALUESPEC ')(?<!})\s*/i';

    
/**
     * @return array<string, mixed>
     */
    
public static function parseAttributes(Cursor $cursor): array
    {
        
$state $cursor->saveState();
        
$cursor->advanceToNextNonSpaceOrNewline();
        if (
$cursor->getCurrentCharacter() !== '{') {
            
$cursor->restoreState($state);

            return [];
        }

        
$cursor->advanceBy(1);
        if (
$cursor->getCurrentCharacter() === ':') {
            
$cursor->advanceBy(1);
        }

        
$attributes = [];
        while (
$attribute \trim((string) $cursor->match(self::REGEX))) {
            if (
$attribute[0] === '#') {
                
$attributes['id'] = \substr($attribute1);

                continue;
            }

            if (
$attribute[0] === '.') {
                
$attributes['class'][] = \substr($attribute1);

                continue;
            }

            [
$name$value] = \explode('='$attribute2);

            
$first $value[0];
            
$last  \substr($value, -1);
            if ((
$first === '"' && $last === '"') || ($first === "'" && $last === "'") && \strlen($value) > 1) {
                
$value \substr($value1, -1);
            }

            if (
\strtolower(\trim($name)) === 'class') {
                foreach (
\array_filter(\explode(' '\trim($value))) as $class) {
                    
$attributes['class'][] = $class;
                }
            } else {
                
$attributes[\trim($name)] = \trim($value);
            }
        }

        if (
$cursor->match('/}/') === null) {
            
$cursor->restoreState($state);

            return [];
        }

        if (
$attributes === []) {
            
$cursor->restoreState($state);

            return [];
        }

        if (isset(
$attributes['class'])) {
            
$attributes['class'] = \implode(' ', (array) $attributes['class']);
        }

        return 
$attributes;
    }

    
/**
     * @param Node|array<string, mixed> $attributes1
     * @param Node|array<string, mixed> $attributes2
     *
     * @return array<string, mixed>
     */
    
public static function mergeAttributes($attributes1$attributes2): array
    {
        
$attributes = [];
        foreach ([
$attributes1$attributes2] as $arg) {
            if (
$arg instanceof Node) {
                
$arg $arg->data->get('attributes');
            }

            
/** @var array<string, mixed> $arg */
            
$arg = (array) $arg;
            if (isset(
$arg['class'])) {
                if (
\is_string($arg['class'])) {
                    
$arg['class'] = \array_filter(\explode(' '\trim($arg['class'])));
                }

                foreach (
$arg['class'] as $class) {
                    
$attributes['class'][] = $class;
                }

                unset(
$arg['class']);
            }

            
$attributes \array_merge($attributes$arg);
        }

        if (isset(
$attributes['class'])) {
            
$attributes['class'] = \implode(' '$attributes['class']);
        }

        return 
$attributes;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0208 ]--