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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/picomail.picotech.app/public_html/vendor/symfony/translation-contracts/   drwxr-xr-x
Free 28.54 GB of 117.98 GB (24.19%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     TranslatorTrait.php (7.42 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Contracts\Translation;

use 
Symfony\Component\Translation\Exception\InvalidArgumentException;

/**
 * A trait to help implement TranslatorInterface and LocaleAwareInterface.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
trait TranslatorTrait
{
    private ?
string $locale null;

    public function 
setLocale(string $locale)
    {
        
$this->locale $locale;
    }

    public function 
getLocale(): string
    
{
        return 
$this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en');
    }

    public function 
trans(?string $id, array $parameters = [], string $domain nullstring $locale null): string
    
{
        if (
null === $id || '' === $id) {
            return 
'';
        }

        if (!isset(
$parameters['%count%']) || !is_numeric($parameters['%count%'])) {
            return 
strtr($id$parameters);
        }

        
$number = (float) $parameters['%count%'];
        
$locale $locale ?: $this->getLocale();

        
$parts = [];
        if (
preg_match('/^\|++$/'$id)) {
            
$parts explode('|'$id);
        } elseif (
preg_match_all('/(?:\|\||[^\|])++/'$id$matches)) {
            
$parts $matches[0];
        }

        
$intervalRegexp = <<<'EOF'
/^(?P<interval>
    ({\s*
        (\-?\d+(\.\d+)?[\s*,\s*\-?\d+(\.\d+)?]*)
    \s*})

        |

    (?P<left_delimiter>[\[\]])
        \s*
        (?P<left>-Inf|\-?\d+(\.\d+)?)
        \s*,\s*
        (?P<right>\+?Inf|\-?\d+(\.\d+)?)
        \s*
    (?P<right_delimiter>[\[\]])
)\s*(?P<message>.*?)$/xs
EOF;

        
$standardRules = [];
        foreach (
$parts as $part) {
            
$part trim(str_replace('||''|'$part));

            
// try to match an explicit rule, then fallback to the standard ones
            
if (preg_match($intervalRegexp$part$matches)) {
                if (
$matches[2]) {
                    foreach (
explode(','$matches[3]) as $n) {
                        if (
$number == $n) {
                            return 
strtr($matches['message'], $parameters);
                        }
                    }
                } else {
                    
$leftNumber '-Inf' === $matches['left'] ? -\INF : (float) $matches['left'];
                    
$rightNumber is_numeric($matches['right']) ? (float) $matches['right'] : \INF;

                    if ((
'[' === $matches['left_delimiter'] ? $number >= $leftNumber $number $leftNumber)
                        && (
']' === $matches['right_delimiter'] ? $number <= $rightNumber $number $rightNumber)
                    ) {
                        return 
strtr($matches['message'], $parameters);
                    }
                }
            } elseif (
preg_match('/^\w+\:\s*(.*?)$/'$part$matches)) {
                
$standardRules[] = $matches[1];
            } else {
                
$standardRules[] = $part;
            }
        }

        
$position $this->getPluralizationRule($number$locale);

        if (!isset(
$standardRules[$position])) {
            
// when there's exactly one rule given, and that rule is a standard
            // rule, use this rule
            
if (=== \count($parts) && isset($standardRules[0])) {
                return 
strtr($standardRules[0], $parameters);
            }

            
$message sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").'$id$locale$number);

            if (
class_exists(InvalidArgumentException::class)) {
                throw new 
InvalidArgumentException($message);
            }

            throw new 
\InvalidArgumentException($message);
        }

        return 
strtr($standardRules[$position], $parameters);
    }

    
/**
     * Returns the plural position to use for the given locale and number.
     *
     * The plural rules are derived from code of the Zend Framework (2010-09-25),
     * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd).
     * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
     */
    
private function getPluralizationRule(float $numberstring $locale): int
    
{
        
$number abs($number);

        return match (
'pt_BR' !== $locale && 'en_US_POSIX' !== $locale && \strlen($locale) > substr($locale0strrpos($locale'_')) : $locale) {
            
'af',
            
'bn',
            
'bg',
            
'ca',
            
'da',
            
'de',
            
'el',
            
'en',
            
'en_US_POSIX',
            
'eo',
            
'es',
            
'et',
            
'eu',
            
'fa',
            
'fi',
            
'fo',
            
'fur',
            
'fy',
            
'gl',
            
'gu',
            
'ha',
            
'he',
            
'hu',
            
'is',
            
'it',
            
'ku',
            
'lb',
            
'ml',
            
'mn',
            
'mr',
            
'nah',
            
'nb',
            
'ne',
            
'nl',
            
'nn',
            
'no',
            
'oc',
            
'om',
            
'or',
            
'pa',
            
'pap',
            
'ps',
            
'pt',
            
'so',
            
'sq',
            
'sv',
            
'sw',
            
'ta',
            
'te',
            
'tk',
            
'ur',
            
'zu' => (== $number) ? 1,
            
'am',
            
'bh',
            
'fil',
            
'fr',
            
'gun',
            
'hi',
            
'hy',
            
'ln',
            
'mg',
            
'nso',
            
'pt_BR',
            
'ti',
            
'wa' => ($number 2) ? 1,
            
'be',
            
'bs',
            
'hr',
            
'ru',
            
'sh',
            
'sr',
            
'uk' => ((== $number 10) && (11 != $number 100)) ? : ((($number 10 >= 2) && ($number 10 <= 4) && (($number 100 10) || ($number 100 >= 20))) ? 2),
            
'cs',
            
'sk' => (== $number) ? : ((($number >= 2) && ($number <= 4)) ? 2),
            
'ga' => (== $number) ? : ((== $number) ? 2),
            
'lt' => ((== $number 10) && (11 != $number 100)) ? : ((($number 10 >= 2) && (($number 100 10) || ($number 100 >= 20))) ? 2),
            
'sl' => (== $number 100) ? : ((== $number 100) ? : (((== $number 100) || (== $number 100)) ? 3)),
            
'mk' => (== $number 10) ? 1,
            
'mt' => (== $number) ? : (((== $number) || (($number 100 1) && ($number 100 11))) ? : ((($number 100 10) && ($number 100 20)) ? 3)),
            
'lv' => (== $number) ? : (((== $number 10) && (11 != $number 100)) ? 2),
            
'pl' => (== $number) ? : ((($number 10 >= 2) && ($number 10 <= 4) && (($number 100 12) || ($number 100 14))) ? 2),
            
'cy' => (== $number) ? : ((== $number) ? : (((== $number) || (11 == $number)) ? 3)),
            
'ro' => (== $number) ? : (((== $number) || (($number 100 0) && ($number 100 20))) ? 2),
            
'ar' => (== $number) ? : ((== $number) ? : ((== $number) ? : ((($number 100 >= 3) && ($number 100 <= 10)) ? : ((($number 100 >= 11) && ($number 100 <= 99)) ? 5)))),
            default => 
0,
        };
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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