diff --git a/README.md b/README.md index beaf1cf..a9dcd46 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,21 @@ SCIM schema PHP library with support for both v1 and v2. [![License](https://img.shields.io/packagist/l/tmilos/scim-schema.svg)](https://packagist.org/packages/tmilos/scim-schema) [![Packagist Version](https://img.shields.io/packagist/v/tmilos/scim-schema.svg?style=flat-square)](https://packagist.org/packages/tmilos/scim-schema) +# Install -# Schema +Install Scim Schema using composer: -Build default schema +```bash +composer require tmilos/scim-schema +``` + +# Usage + +### Schema + +Build default schema: ```php -getGroup(); @@ -33,12 +41,13 @@ $serviceProviderConfigSchema = $schemaBuilder->getServiceProviderConfig(); $resourceTypeSchema = $schemaBuilder->getResourceType(); ``` -Or build your own custom schema +Or build your own custom schema: ```php -setName('CustomSchema); + +$schema->setName('CustomSchema'); + $schema->addAttribute( AttributeBuilder::create('name', ScimConstants::ATTRIBUTE_TYPE_STRING, 'Name of the object') ->setMutability(false) @@ -49,16 +58,14 @@ $schema->addAttribute( And serialize the scim schema object ```php -getUser(); + $schema->serializeObject(); ``` +### Schema validation - -# Schema validation - -An object can be validated against a schema +An object can be validated against a schema: ```php /** @var array $object */