# getSchema

Learn how to read the content schema.

This method gives you the [content schema](/reference/content/schema/introduction), when requested through [`withSchema`](/reference/sdk/php/api/options/fetch-options/with-schema).

## Signature

This method has the following signature:

```php
public function getSchema(): ?array
```

This method returns the [content schema](/reference/content/schema/introduction), or `null` when it was not requested.

## Example

Here is a basic example of how to use this method:

```php
<?php
use Croct\Plug\Croct;
use Croct\Plug\FetchOptions;

$croct = Croct::fromDotenv();
$options = FetchOptions::defaults()->withSchema();
$metadata = $croct->fetchContent('home-banner', $options)->getMetadata();
$schema = $metadata->getSchema();
```
