Mapping/PropertyDefinition.php
private function findGetter()
    {
        $reflClass = new \ReflectionClass($this->class);
        $camelProp = $this->camelize($this->name);

        // Try to find a getter
        $getter = 'get'.$camelProp;
        $isser = 'is'.$camelProp;
        $hasser = 'has'.$camelProp;
        $classHasProperty = $reflClass->hasProperty($this->name);

        if ($reflClass->hasMethod($this->name) && $reflClass->getMethod($this->name)->isPublic()) {
            $this->getter = $this->name;
            $this->getterType = self::GETTER_SETTER_METHOD;
        } elseif ($reflClass->hasMethod($getter) && $reflClass->getMethod($getter)->isPublic()) {
            $this->getter = $getter;
            $this->getterType = self::GETTER_SETTER_METHOD;
        } elseif ($reflClass->hasMethod($isser) && $reflClass->getMethod($isser)->isPublic()) {
            $this->getter = $isser;
            $this->getterType = self::GETTER_SETTER_METHOD;
        } elseif ($reflClass->hasMethod($hasser) && $reflClass->getMethod($hasser)->isPublic()) {
            $this->getter = $hasser;
            $this->getterType = self::GETTER_SETTER_METHOD;
        } elseif (($reflClass->hasMethod('__get') && $reflClass->getMethod('__get')->isPublic()) ||
                  ($classHasProperty && $reflClass->getProperty($this->name)->isPublic())) {
            $this->getter = $this->name;
            $this->getterType = self::GETTER_SETTER_PROPERTY;
        // } elseif ($this->magicCall && $reflClass->hasMethod('__call') && $reflClass->getMethod('__call')->isPublic()) {
        //     // we call the getter and hope the __call do the job
        //     $result[self::VALUE] = $object->$getter();
        }
    }
private function findGetter()
    {
        $reflClass = new \ReflectionClass($this->class);
        $camelProp = $this->camelize($this->name);

        // Try to find a getter
        $getter = 'get'.$camelProp;
        $isser = 'is'.$camelProp;
        $hasser = 'has'.$camelProp;
        $classHasProperty = $reflClass->hasProperty($this->name);

        if ($reflClass->hasMethod($this->name) && $reflClass->getMethod($this->name)->isPublic()) {
            $this->getter = $this->name;
            $this->getterType = self::GETTER_SETTER_METHOD;
        } elseif ($reflClass->hasMethod($getter) && $reflClass->getMethod($getter)->isPublic()) {
            $this->getter = $getter;
            $this->getterType = self::GETTER_SETTER_METHOD;
        } elseif ($reflClass->hasMethod($isser) && $reflClass->getMethod($isser)->isPublic()) {
            $this->getter = $isser;
            $this->getterType = self::GETTER_SETTER_METHOD;
        } elseif ($reflClass->hasMethod($hasser) && $reflClass->getMethod($hasser)->isPublic()) {
            $this->getter = $hasser;
            $this->getterType = self::GETTER_SETTER_METHOD;
        } elseif (($reflClass->hasMethod('__get') && $reflClass->getMethod('__get')->isPublic()) ||
                  ($classHasProperty && $reflClass->getProperty($this->name)->isPublic())) {
            $this->getter = $this->name;
            $this->getterType = self::GETTER_SETTER_PROPERTY;
        // } elseif ($this->magicCall && $reflClass->hasMethod('__call') && $reflClass->getMethod('__call')->isPublic()) {
        //     // we call the getter and hope the __call do the job
        //     $result[self::VALUE] = $object->$getter();
        }
    }
Try to find the getter associated to this property

Simplified version of {@link Symfony\Component\PropertyAccess\PropertyAccessor}.