public static function position($position): string
    {
        $position = strtolower(trim($position));
        $position = str_replace(['-', '_'], ' ', $position);

        if (in_array($position, [self::TOP, 'top', 't'], true)) {
            return self::TOP;
        }

        if (in_array($position, [self::TOP_RIGHT, 'top right', 'right top', 'tr', 'rt'], true)) {
            return self::TOP_RIGHT;
        }

        if (in_array($position, [self::RIGHT, 'right', 'r'], true)) {
            return self::RIGHT;
        }

        if (in_array($position, [self::BOTTOM_RIGHT, 'bottom right', 'right bottom', 'br', 'rb'], true)) {
            return self::BOTTOM_RIGHT;
        }

        if (in_array($position, [self::BOTTOM, 'bottom', 'b'], true)) {
            return self::BOTTOM;
        }

        if (in_array($position, [self::BOTTOM_LEFT, 'bottom left', 'left bottom', 'bl', 'lb'], true)) {
            return self::BOTTOM_LEFT;
        }

        if (in_array($position, [self::LEFT, 'left', 'l'], true)) {
            return self::LEFT;
        }

        if (in_array($position, [self::TOP_LEFT, 'top left', 'left top', 'tl', 'lt'], true)) {
            return self::TOP_LEFT;
        }

        return self::CENTER;
    }
public static function position($position): string
    {
        $position = strtolower(trim($position));
        $position = str_replace(['-', '_'], ' ', $position);

        if (in_array($position, [self::TOP, 'top', 't'], true)) {
            return self::TOP;
        }

        if (in_array($position, [self::TOP_RIGHT, 'top right', 'right top', 'tr', 'rt'], true)) {
            return self::TOP_RIGHT;
        }

        if (in_array($position, [self::RIGHT, 'right', 'r'], true)) {
            return self::RIGHT;
        }

        if (in_array($position, [self::BOTTOM_RIGHT, 'bottom right', 'right bottom', 'br', 'rb'], true)) {
            return self::BOTTOM_RIGHT;
        }

        if (in_array($position, [self::BOTTOM, 'bottom', 'b'], true)) {
            return self::BOTTOM;
        }

        if (in_array($position, [self::BOTTOM_LEFT, 'bottom left', 'left bottom', 'bl', 'lb'], true)) {
            return self::BOTTOM_LEFT;
        }

        if (in_array($position, [self::LEFT, 'left', 'l'], true)) {
            return self::LEFT;
        }

        if (in_array($position, [self::TOP_LEFT, 'top left', 'left top', 'tl', 'lt'], true)) {
            return self::TOP_LEFT;
        }

        return self::CENTER;
    }
public static function position ( $ position ) : string { $ position = strtolower ( trim ( $ position ) ) ; $ position = str_replace ( [ '-' , '_' ] , ' ' , $ position ) ; if ( in_array ( $ position , [ self :: TOP , 'top' , 't' ] , true ) ) { return self :: TOP ; } if ( in_array ( $ position , [ self :: TOP_RIGHT , 'top right' , 'right top' , 'tr' , 'rt' ] , true ) ) { return self :: TOP_RIGHT ; } if ( in_array ( $ position , [ self :: RIGHT , 'right' , 'r' ] , true ) ) { return self :: RIGHT ; } if ( in_array ( $ position , [ self :: BOTTOM_RIGHT , 'bottom right' , 'right bottom' , 'br' , 'rb' ] , true ) ) { return self :: BOTTOM_RIGHT ; } if ( in_array ( $ position , [ self :: BOTTOM , 'bottom' , 'b' ] , true ) ) { return self :: BOTTOM ; } if ( in_array ( $ position , [ self :: BOTTOM_LEFT , 'bottom left' , 'left bottom' , 'bl' , 'lb' ] , true ) ) { return self :: BOTTOM_LEFT ; } if ( in_array ( $ position , [ self :: LEFT , 'left' , 'l' ] , true ) ) { return self :: LEFT ; } if ( in_array ( $ position , [ self :: TOP_LEFT , 'top left' , 'left top' , 'tl' , 'lt' ] , true ) ) { return self :: TOP_LEFT ; } return self :: CENTER ; }
Check position name

@param string $position
@return string
Check position name