Mapping/PropertyDefinition.php
private function findAdderAndRemover()
    {
        $reflClass = new \ReflectionClass($this->class);
        $singulars = (array) StringUtil::singularify($this->camelize($this->name));

        foreach ($singulars as $singular) {
            $addMethod = 'add'.$singular;
            $removeMethod = 'remove'.$singular;

            $addMethodFound = $this->isAccessible($reflClass, $addMethod, 1);
            $removeMethodFound = $this->isAccessible($reflClass, $removeMethod, 1);

            if ($addMethodFound && $removeMethodFound) {
                $this->adderRemover = $singular;

                return;
            }
        }
    }
private function findAdderAndRemover()
    {
        $reflClass = new \ReflectionClass($this->class);
        $singulars = (array) StringUtil::singularify($this->camelize($this->name));

        foreach ($singulars as $singular) {
            $addMethod = 'add'.$singular;
            $removeMethod = 'remove'.$singular;

            $addMethodFound = $this->isAccessible($reflClass, $addMethod, 1);
            $removeMethodFound = $this->isAccessible($reflClass, $removeMethod, 1);

            if ($addMethodFound && $removeMethodFound) {
                $this->adderRemover = $singular;

                return;
            }
        }
    }
Searches add and remove methods

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