BEdita API doc | 4-cactus
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Download

Namespaces

  • BEdita
    • API
      • Auth
      • Controller
        • Admin
        • Model
      • Exception
      • Middleware
      • Model
        • Action
      • Network
        • Exception
      • Utility
    • Core
      • Database
        • Type
      • Exception
      • Filesystem
        • Adapter
        • Exception
        • Thumbnail
      • Job
        • Service
      • Mailer
        • Preview
        • Transport
      • Model
        • Action
        • Behavior
        • Entity
        • Validation
      • ORM
        • Locator
      • Utility

Classes

  • Database
  • JsonSchema
  • LoggedUser
  • System
  • Text

Interfaces

  • JsonApiSerializable

Class JsonSchema

JSON Schema generation utilities

Provides static methods to generate JSON Schema for objects and resources

Namespace: BEdita\Core\Utility
Located at Core/src/Utility/JsonSchema.php

Methods summary

public static
# generate( $type, $url )

Valid resource names

Valid resource names

Var

array
public static mixed
# typeSchema( string $type )

Schema of a resource or object type

Schema of a resource or object type

Parameters

$type
Resource or object type name

Returns

mixed

Throws

Cake\Http\Exception\NotFoundException
if no type is found
protected static array|boolean
# addRevision( array|boolean $schema )

Add revision information to schema

Add revision information to schema

Parameters

$schema
Schema array or false

Returns

array|boolean
Schema with revision or false
public static string|boolean
# schemaRevision( string $type )

Get current revision of a type schema

Get current revision of a type schema

Parameters

$type
Resource or object type name

Returns

string|boolean
Schema revision or false if no schema is found

Throws

Cake\Http\Exception\NotFoundException
if no type is found
public static array
# resourceSchema( string $resource )

Build resource properties directly from a db table

Build resource properties directly from a db table

Parameters

$resource
Resource type name

Returns

array
JSON Schema array with properties and required
public static mixed
# objectSchema( BEdita\Core\Model\Entity\ObjectType $objectType )

Object type properties representation as array

Object type properties representation as array

Parameters

$objectType
Object type to represent

Returns

mixed
JSON Schema array with properties and required
BEdita API doc | 4-cactus API documentation generated by ApiGen