ICanBoogie/ICanBoogie 3.0.x
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Autoconfig
    • Binding
    • Core
    • Routing
    • Session

Classes

  • Config
  • FakeAutoloadGenerator
  • Hooks
  • Schema

Class Schema

A JSON schema.

Used to validate other JSON files.

Namespace: ICanBoogie\Autoconfig
Codecoverageignore
Located at Autoconfig/Schema.php

Methods summary

public static
# read_json( $pathname )
public
# __construct( string $pathname )

Initialize the ICanBoogie\Autoconfig\Schema::$schema and ICanBoogie\Autoconfig\Schema::$validator properties.

Initialize the ICanBoogie\Autoconfig\Schema::$schema and ICanBoogie\Autoconfig\Schema::$validator properties.

Parameters

$pathname
The pathname to the schema file.
public boolean
# validate( mixed $data, string $pathname )

Validate some data against the schema.

Validate some data against the schema.

Parameters

$data
Data to validate.
$pathname
The pathname to the file where the data is defined.

Returns

boolean
true if the data is valid.

Throws

Exception
when the data is not valid.
public boolean
# validate_file( string $pathname )

Validate a JSON file against the schema.

Validate a JSON file against the schema.

Parameters

$pathname
The pathname to the JSON file to validate.

Returns

boolean

See

ICanBoogie\Autoconfig\Schema::validate()

Properties summary

protected mixed $schema

Schema.

Schema.

#
protected JsonSchema\Validator $validator

Validator.

Validator.

#
ICanBoogie/ICanBoogie 3.0.x API documentation generated by ApiGen