ICanBoogie
  • Documentation
  • API Reference
  • ICanBoogie 4.0.x
Namespaces
  • ICanBoogie
    • Application
    • Autoconfig
    • Binding
    • Routing
    • Session
Classes
  • AutoconfigGenerator
  • FakeAutoloadGenerator
  • Hooks
  • Schema
Interfaces
  • Autoconfig

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 validate( mixed $data, string $pathname ) : boolean

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 validate_file( string $pathname ) : boolean

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 $schema : mixed

Schema.

Schema.


		
protected $validator : JsonSchema\Validator

Validator.

Validator.


		
ICanBoogie 4.0.x – Check on GitHub – API documentation generated by ApiGen