private function registerAnnotation($class)
    {
        /** @var CustomField $annotation */
        if ($annotation = $this->annotationReader->getClassAnnotation(
            new \ReflectionClass($class),
            'Lullabot\Mpx\DataService\Annotation\CustomField'
        )) {
            if (!is_subclass_of($class, CustomFieldInterface::class)) {
                throw new \RuntimeException(sprintf('%s must implement %s.', $class, CustomFieldInterface::class));
            }

            $this->customFields[$annotation->service][$annotation->objectType][$annotation->namespace] = new DiscoveredCustomField(
                $class, $annotation
            );
        }
    }
private function registerAnnotation($class)
    {
        /** @var CustomField $annotation */
        if ($annotation = $this->annotationReader->getClassAnnotation(
            new \ReflectionClass($class),
            'Lullabot\Mpx\DataService\Annotation\CustomField'
        )) {
            if (!is_subclass_of($class, CustomFieldInterface::class)) {
                throw new \RuntimeException(sprintf('%s must implement %s.', $class, CustomFieldInterface::class));
            }

            $this->customFields[$annotation->service][$annotation->objectType][$annotation->namespace] = new DiscoveredCustomField(
                $class, $annotation
            );
        }
    }
private function registerAnnotation ( $ class ) { /** @var CustomField $annotation */ if ( $ annotation = $ this -> annotationReader -> getClassAnnotation ( new \ ReflectionClass ( $ class ) , 'Lullabot\Mpx\DataService\Annotation\CustomField' ) ) { if ( ! is_subclass_of ( $ class , CustomFieldInterface :: class ) ) { throw new \ RuntimeException ( sprintf ( '%s must implement %s.' , $ class , CustomFieldInterface :: class ) ) ; } $ this -> customFields [ $ annotation -> service ] [ $ annotation -> objectType ] [ $ annotation -> namespace ] = new DiscoveredCustomField ( $ class , $ annotation ) ; } }
Register an annotation and it's custom fields.

@param string $class The class to inspect for a CustomField annotation.
Register an annotation and it s custom fields .