!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)

/uploads/script/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/   drwxr-xr-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:     StaticPHPDriver.php (3.23 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Doctrine\Persistence\Mapping\Driver;

use 
Doctrine\Persistence\Mapping\ClassMetadata;
use 
Doctrine\Persistence\Mapping\MappingException;
use 
RecursiveDirectoryIterator;
use 
RecursiveIteratorIterator;
use 
ReflectionClass;
use function 
array_merge;
use function 
array_unique;
use function 
class_exists;
use function 
get_declared_classes;
use function 
in_array;
use function 
interface_exists;
use function 
is_dir;
use function 
method_exists;
use function 
realpath;

/**
 * The StaticPHPDriver calls a static loadMetadata() method on your entity
 * classes where you can manually populate the ClassMetadata instance.
 */
class StaticPHPDriver implements MappingDriver
{
    
/**
     * Paths of entity directories.
     *
     * @var string[]
     */
    
private $paths = [];

    
/**
     * Map of all class names.
     *
     * @var string[]
     */
    
private $classNames;

    
/**
     * @param string[]|string $paths
     */
    
public function __construct($paths)
    {
        
$this->addPaths((array) $paths);
    }

    
/**
     * Adds paths.
     *
     * @param string[] $paths
     *
     * @return void
     */
    
public function addPaths(array $paths)
    {
        
$this->paths array_unique(array_merge($this->paths$paths));
    }

    
/**
     * {@inheritdoc}
     */
    
public function loadMetadataForClass($classNameClassMetadata $metadata)
    {
        
$className::loadMetadata($metadata);
    }

    
/**
     * {@inheritDoc}
     *
     * @todo Same code exists in AnnotationDriver, should we re-use it somehow or not worry about it?
     */
    
public function getAllClassNames()
    {
        if (
$this->classNames !== null) {
            return 
$this->classNames;
        }

        if (! 
$this->paths) {
            throw 
MappingException::pathRequired();
        }

        
$classes       = [];
        
$includedFiles = [];

        foreach (
$this->paths as $path) {
            if (! 
is_dir($path)) {
                throw 
MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
            }

            
$iterator = new RecursiveIteratorIterator(
                new 
RecursiveDirectoryIterator($path),
                
RecursiveIteratorIterator::LEAVES_ONLY
            
);

            foreach (
$iterator as $file) {
                if (
$file->getBasename('.php') === $file->getBasename()) {
                    continue;
                }

                
$sourceFile realpath($file->getPathName());
                require_once 
$sourceFile;
                
$includedFiles[] = $sourceFile;
            }
        }

        
$declared get_declared_classes();

        foreach (
$declared as $className) {
            
$rc         = new ReflectionClass($className);
            
$sourceFile $rc->getFileName();
            if (! 
in_array($sourceFile$includedFiles) || $this->isTransient($className)) {
                continue;
            }

            
$classes[] = $className;
        }

        
$this->classNames $classes;

        return 
$classes;
    }

    
/**
     * {@inheritdoc}
     */
    
public function isTransient($className)
    {
        return ! 
method_exists($className'loadMetadata');
    }
}

class_exists(\Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver::class);
interface_exists(ClassMetadata::class);

:: 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.0054 ]--