diff --git a/README.md b/README.md index f903702..4c2eb24 100644 --- a/README.md +++ b/README.md @@ -7,23 +7,23 @@ A PHP implementation of [JSON Schema](http://json-schema.org/). This library all Install the latest version with ```bash -$ composer require knplabs/php-json-schema +$ composer require Knp/php-json-schema ``` # Basic Usage -A JsonSchema must implements `KnpLabs\JsonSchema\JsonSchemaInterface` (which is basically an alias for `JsonSerializable`). +A JsonSchema must implements `Knp\JsonSchema\JsonSchemaInterface` (which is basically an alias for `JsonSerializable`). ## Default JsonSchema -There is already a default implementation of `JsonSchemaInterface` called `KnpLabs\JsonSchema\JsonSchema` which is an abstract class. This class provides some static methods to create some common JSON Schema scalars or objects. +There is already a default implementation of `JsonSchemaInterface` called `Knp\JsonSchema\JsonSchema` which is an abstract class. This class provides some static methods to create some common JSON Schema scalars or objects. ## Scalars ### `JsonSchema::string()` ```php -use KnpLabs\JsonSchema\JsonSchema; +use Knp\JsonSchema\JsonSchema; $schema = JsonSchema::create( 'firstName', // The name of the property @@ -36,7 +36,7 @@ $schema = JsonSchema::create( ### `JsonSchema::text()` ```php -use KnpLabs\JsonSchema\JsonSchema; +use Knp\JsonSchema\JsonSchema; $schema = JsonSchema::create( 'content', // The name of the property @@ -49,7 +49,7 @@ $schema = JsonSchema::create( ### `JsonSchema::integer()` ```php -use KnpLabs\JsonSchema\JsonSchema; +use Knp\JsonSchema\JsonSchema; $schema = JsonSchema::create( 'age', // The name of the property @@ -62,7 +62,7 @@ $schema = JsonSchema::create( ### `JsonSchema::positiveInteger()` ```php -use KnpLabs\JsonSchema\JsonSchema; +use Knp\JsonSchema\JsonSchema; $schema = JsonSchema::create( 'age', // The name of the property @@ -75,7 +75,7 @@ $schema = JsonSchema::create( ### `JsonSchema::number()` ```php -use KnpLabs\JsonSchema\JsonSchema; +use Knp\JsonSchema\JsonSchema; $schema = JsonSchema::create( 'price', // The name of the property @@ -88,7 +88,7 @@ $schema = JsonSchema::create( ### `JsonSchema::boolean()` ```php -use KnpLabs\JsonSchema\JsonSchema; +use Knp\JsonSchema\JsonSchema; $schema = JsonSchema::create( 'isAdult', // The name of the property @@ -101,7 +101,7 @@ $schema = JsonSchema::create( ### `JsonSchema::date()` ```php -use KnpLabs\JsonSchema\JsonSchema; +use Knp\JsonSchema\JsonSchema; $schema = JsonSchema::create( 'createdAt', // The name of the property @@ -114,14 +114,14 @@ $schema = JsonSchema::create( ## Enum Enum is a special type of scalar which is a list of possible values. -They can be created by extending the `KnpLabs\JsonSchema\EnumSchema`: +They can be created by extending the `Knp\JsonSchema\EnumSchema`: ```php diff --git a/src/Scalar/UuidSchema.php b/src/Scalar/UuidSchema.php index 227521f..b51e083 100644 --- a/src/Scalar/UuidSchema.php +++ b/src/Scalar/UuidSchema.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace KnpLabs\JsonSchema\Scalar; +namespace Knp\JsonSchema\Scalar; -use KnpLabs\JsonSchema\JsonSchema; +use Knp\JsonSchema\JsonSchema; /** * @extends JsonSchema diff --git a/src/Validator.php b/src/Validator.php index 289a6b7..8d98156 100644 --- a/src/Validator.php +++ b/src/Validator.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace KnpLabs\JsonSchema; +namespace Knp\JsonSchema; -use KnpLabs\JsonSchema\Validator\Errors; +use Knp\JsonSchema\Validator\Errors; interface Validator { diff --git a/src/Validator/Error.php b/src/Validator/Error.php index 7c978e1..8b18d2e 100644 --- a/src/Validator/Error.php +++ b/src/Validator/Error.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace KnpLabs\JsonSchema\Validator; +namespace Knp\JsonSchema\Validator; final class Error { diff --git a/src/Validator/Errors.php b/src/Validator/Errors.php index c53b6a4..58608d7 100644 --- a/src/Validator/Errors.php +++ b/src/Validator/Errors.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace KnpLabs\JsonSchema\Validator; +namespace Knp\JsonSchema\Validator; use ArrayIterator; use Countable;