public static function get($dictionary, $key, PdfType $default = null)
    {
        $dictionary = self::ensure($dictionary);

        if (isset($dictionary->value[$key])) {
            return $dictionary->value[$key];
        }

        return $default === null
            ? new PdfNull()
            : $default;
    }
public static function get($dictionary, $key, PdfType $default = null)
    {
        $dictionary = self::ensure($dictionary);

        if (isset($dictionary->value[$key])) {
            return $dictionary->value[$key];
        }

        return $default === null
            ? new PdfNull()
            : $default;
    }
public static function get ( $ dictionary , $ key , PdfType $ default = null ) { $ dictionary = self :: ensure ( $ dictionary ) ; if ( isset ( $ dictionary -> value [ $ key ] ) ) { return $ dictionary -> value [ $ key ] ; } return $ default === null ? new PdfNull ( ) : $ default ; }
Get a value by its key from a dictionary or a default value.

@param mixed $dictionary
@param string $key
@param PdfType|mixed|null $default
@return PdfNull|PdfType
@throws PdfTypeException
Get a value by its key from a dictionary or a default value .