/**
  * @param string $className
  * @param Field  $field
  * @return string|null
  */
 private function getAccessor($className, Field $field)
 {
     $class = new \ReflectionClass($className);
     $property = $field->getField() ?: $field->getName();
     $camelName = String::camelize($property);
     $getter = 'get' . $camelName;
     $getsetter = lcfirst($camelName);
     $isser = 'is' . $camelName;
     $hasser = 'has' . $camelName;
     $test = [$getter, $getsetter, $isser, $hasser];
     $reflMethods = $class->getMethods(\ReflectionMethod::IS_PUBLIC);
     $methods = [];
     foreach ($reflMethods as $reflMethod) {
         $methods[$reflMethod->getName()] = true;
     }
     foreach ($test as $method) {
         if (isset($methods[$method])) {
             return $method;
         }
     }
 }