public function create(string $className): array
    {
        $this->findIdentityField($className);

        $class = $this->metadata->getReflectionClass();
        $methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
        $fieldConfigurations = [];
        foreach ($methods as $method) {
            // Skip non-callable or non-instance
            if ($method->isAbstract() || $method->isStatic()) {
                continue;
            }

            // Skip non-getter methods
            $name = $method->getName();
            if (!preg_match($this->getMethodPattern(), $name)) {
                continue;
            }

            // Skip exclusion specified by user
            if ($this->isExcluded($method)) {
                continue;
            }

            $configuration = $this->methodToConfiguration($method);
            if ($configuration) {
                $fieldConfigurations[] = $configuration;
            }
        }

        return $fieldConfigurations;
    }
public function create(string $className): array
    {
        $this->findIdentityField($className);

        $class = $this->metadata->getReflectionClass();
        $methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
        $fieldConfigurations = [];
        foreach ($methods as $method) {
            // Skip non-callable or non-instance
            if ($method->isAbstract() || $method->isStatic()) {
                continue;
            }

            // Skip non-getter methods
            $name = $method->getName();
            if (!preg_match($this->getMethodPattern(), $name)) {
                continue;
            }

            // Skip exclusion specified by user
            if ($this->isExcluded($method)) {
                continue;
            }

            $configuration = $this->methodToConfiguration($method);
            if ($configuration) {
                $fieldConfigurations[] = $configuration;
            }
        }

        return $fieldConfigurations;
    }
public function create ( string $ className ) : array { $ this -> findIdentityField ( $ className ) ; $ class = $ this -> metadata -> getReflectionClass ( ) ; $ methods = $ class -> getMethods ( ReflectionMethod :: IS_PUBLIC ) ; $ fieldConfigurations = [ ] ; foreach ( $ methods as $ method ) { // Skip non-callable or non-instance if ( $ method -> isAbstract ( ) || $ method -> isStatic ( ) ) { continue ; } // Skip non-getter methods $ name = $ method -> getName ( ) ; if ( ! preg_match ( $ this -> getMethodPattern ( ) , $ name ) ) { continue ; } // Skip exclusion specified by user if ( $ this -> isExcluded ( $ method ) ) { continue ; } $ configuration = $ this -> methodToConfiguration ( $ method ) ; if ( $ configuration ) { $ fieldConfigurations [ ] = $ configuration ; } } return $ fieldConfigurations ; }
Create a configuration for all fields of Doctrine entity

@param string $className

@return array
Create a configuration for all fields of Doctrine entity