$47 GRAYBYTE WORDPRESS FILE MANAGER $22

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

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

HOME
Current File : /opt/alt/php54/usr/share/pear/Symfony/Component/Validator/Mapping//GetterMetadata.php
<?php

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

namespace Symfony\Component\Validator\Mapping;

use Symfony\Component\Validator\Exception\ValidatorException;

class GetterMetadata extends MemberMetadata
{
    /**
     * Constructor.
     *
     * @param string $class    The class the getter is defined on
     * @param string $property The property which the getter returns
     *
     * @throws ValidatorException
     */
    public function __construct($class, $property)
    {
        $getMethod = 'get'.ucfirst($property);
        $isMethod = 'is'.ucfirst($property);

        if (method_exists($class, $getMethod)) {
            $method = $getMethod;
        } elseif (method_exists($class, $isMethod)) {
            $method = $isMethod;
        } else {
            throw new ValidatorException(sprintf('Neither method %s nor %s exists in class %s', $getMethod, $isMethod, $class));
        }

        parent::__construct($class, $method, $property);
    }

    /**
     * {@inheritDoc}
     */
    public function getPropertyValue($object)
    {
        return $this->newReflectionMember($object)->invoke($object);
    }

    /**
     * {@inheritDoc}
     */
    protected function newReflectionMember($objectOrClassName)
    {
        return new \ReflectionMethod($objectOrClassName, $this->getName());
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
Cache
--
3 Mar 2024 10.54 PM
root / root
0755
Loader
--
3 Mar 2024 10.54 PM
root / root
0755
BlackholeMetadataFactory.php
0.896 KB
18 Dec 2019 11.22 AM
root / root
0644
ClassMetadata.php
11.795 KB
18 Dec 2019 11.22 AM
root / root
0644
ClassMetadataFactory.php
3.2 KB
18 Dec 2019 11.22 AM
root / root
0644
ElementMetadata.php
2.283 KB
18 Dec 2019 11.22 AM
root / root
0644
GetterMetadata.php
1.475 KB
18 Dec 2019 11.22 AM
root / root
0644
MemberMetadata.php
5.845 KB
18 Dec 2019 11.22 AM
root / root
0644
PropertyMetadata.php
1.441 KB
18 Dec 2019 11.22 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF