$53 GRAYBYTE WORDPRESS FILE MANAGER $58

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/php54/usr/share/pear/Symfony/Component/Validator/Mapping/Loader/

HOME
Current File : /opt/alt/php54/usr/share/pear/Symfony/Component/Validator/Mapping/Loader//StaticMethodLoader.php
<?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\Component\Validator\Mapping\Loader;

use Symfony\Component\Validator\Exception\MappingException;
use Symfony\Component\Validator\Mapping\ClassMetadata;

class StaticMethodLoader implements LoaderInterface
{
    protected $methodName;

    public function __construct($methodName = 'loadValidatorMetadata')
    {
        $this->methodName = $methodName;
    }

    /**
     * {@inheritDoc}
     */
    public function loadClassMetadata(ClassMetadata $metadata)
    {
        /** @var \ReflectionClass $reflClass */
        $reflClass = $metadata->getReflectionClass();

        if (!$reflClass->isInterface() && $reflClass->hasMethod($this->methodName)) {
            $reflMethod = $reflClass->getMethod($this->methodName);

            if ($reflMethod->isAbstract()) {
                return false;
            }

            if (!$reflMethod->isStatic()) {
                throw new MappingException(sprintf('The method %s::%s should be static', $reflClass->name, $this->methodName));
            }

            if ($reflMethod->getDeclaringClass()->name != $reflClass->name) {
                return false;
            }

            $reflMethod->invoke(null, $metadata);

            return true;
        }

        return false;
    }
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 7.05 AM
root / root
0755
schema
--
31 Aug 2024 7.05 AM
root / root
0755
AbstractLoader.php
1.943 KB
18 Dec 2019 6.22 PM
root / root
0644
AnnotationLoader.php
3.079 KB
18 Dec 2019 6.22 PM
root / root
0644
FileLoader.php
0.999 KB
18 Dec 2019 6.22 PM
root / root
0644
FilesLoader.php
1.382 KB
18 Dec 2019 6.22 PM
root / root
0644
LoaderChain.php
1.703 KB
18 Dec 2019 6.22 PM
root / root
0644
LoaderInterface.php
0.562 KB
18 Dec 2019 6.22 PM
root / root
0644
StaticMethodLoader.php
1.462 KB
18 Dec 2019 6.22 PM
root / root
0644
XmlFileLoader.php
5.798 KB
18 Dec 2019 6.22 PM
root / root
0644
XmlFilesLoader.php
0.631 KB
18 Dec 2019 6.22 PM
root / root
0644
YamlFileLoader.php
4.354 KB
18 Dec 2019 6.22 PM
root / root
0644
YamlFilesLoader.php
0.634 KB
18 Dec 2019 6.22 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF