PHPackages                             structr/structr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. structr/structr

ActiveLibrary[API Development](/categories/api)

structr/structr
===============

Validate and coerce complex data structures to conform to a specification

1.1.0(12y ago)4413.8k↓25%5MITPHPPHP &gt;=5.3.0

Since Jan 31Pushed 8y ago4 watchersCompare

[ Source](https://github.com/gwkunze/Structr)[ Packagist](https://packagist.org/packages/structr/structr)[ Docs](http://github.com/gwkunze/Structr)[ RSS](/packages/structr-structr/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Structr
=======

[](#structr)

[![Build Status](https://camo.githubusercontent.com/ce8a158714d9cdf57ec33857a614630f235e8ab6b1e2265061e7e4fb9229bf09/68747470733a2f2f7472617669732d63692e6f72672f67776b756e7a652f537472756374722e706e67)](https://travis-ci.org/gwkunze/Structr)

With the advent of document based stores like CouchDB and MongoDB complex data structures are a lot more common within web applications. You no longer have a separate array containing a blog post and another containing all comments but a single document containing most, if not all data. The schema-less design most of these document stores use can lead to huge mess if one doesn't exercise sufficient discipline.

With Structr you can define the format of these documents within your application so you can validate and/or transform documents. Furthermore Structr can change variable types or run custom code on parts of the document.

Besides complex documents Structr can be used to parse most PHP data such as request parameters, for example you can use it to define valid values for a paging GET parameter.

Example
=======

[](#example)

```
