Skip to content

Allow for property check before get #14

@khusseini

Description

@khusseini

Hello there,

first of all thank you for your library, I really like it. There is one issue through with the Schema Object.
Would it be possible to add two check methods "hasProperties" and "hasAdditionalProperties" in order to be able to check for their existence before calling get in order to avoid a try catch block?

I try always try to avoid try catch blocks for performance reasons where possible.

It would be just a convenience as I could actually also check the underlying document:

if ( property_exists( $definition->getDocument(), 'properties' ) ) {
    $props = $definition->getProperties();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions