src/Entity/Reflection/Annotation.php
public static function registerOption($key, $class)
    {
        if (empty($key)) {
            throw new Exception\AnnotationException(
                "Option key can not be empty!"
            );
        }
        if (!class_exists($class)) {
            throw new Exception\AnnotationException(
                "Class " . $class . " not found!"
            );
        }
        if (!in_array("UniMapper\Entity\Reflection\Property\IOption", class_implements($class))) {
            throw new Exception\AnnotationException(
                "Class " . $class
                . " should implement UniMapper\Entity\Reflection\Property\IOption!"
            );
        }
        self::$options[$key] = $class;
    }
public static function registerOption($key, $class)
    {
        if (empty($key)) {
            throw new Exception\AnnotationException(
                "Option key can not be empty!"
            );
        }
        if (!class_exists($class)) {
            throw new Exception\AnnotationException(
                "Class " . $class . " not found!"
            );
        }
        if (!in_array("UniMapper\Entity\Reflection\Property\IOption", class_implements($class))) {
            throw new Exception\AnnotationException(
                "Class " . $class
                . " should implement UniMapper\Entity\Reflection\Property\IOption!"
            );
        }
        self::$options[$key] = $class;
    }
public static function registerOption ( $ key , $ class ) { if ( empty ( $ key ) ) { throw new Exception \ AnnotationException ( "Option key can not be empty!" ) ; } if ( ! class_exists ( $ class ) ) { throw new Exception \ AnnotationException ( "Class " . $ class . " not found!" ) ; } if ( ! in_array ( "UniMapper\Entity\Reflection\Property\IOption" , class_implements ( $ class ) ) ) { throw new Exception \ AnnotationException ( "Class " . $ class . " should implement UniMapper\Entity\Reflection\Property\IOption!" ) ; } self :: $ options [ $ key ] = $ class ; }
Register new property option

@param string $key
@param string $class

@throws Exception\AnnotationException
Register new property option