PHPackages                             energylab/gacela - 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. [Database &amp; ORM](/categories/database)
4. /
5. energylab/gacela

ActiveLibrary[Database &amp; ORM](/categories/database)

energylab/gacela
================

Responsive Data Mapper for PHP

1.0.0(12y ago)291446[2 issues](https://github.com/energylab/gacela/issues)MITPHP

Since May 16Pushed 12y ago5 watchersCompare

[ Source](https://github.com/energylab/gacela)[ Packagist](https://packagist.org/packages/energylab/gacela)[ RSS](/packages/energylab-gacela/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Mapping Data Structures to PHP Objects
======================================

[](#mapping-data-structures-to-php-objects)

Most useful applications interact with data in some form. There are multiple solutions for storing data and for each of those solutions, sometimes multiple formats in which the data can be stored. When using object-oriented PHP, that same data is stored, modified and accessed in a class.

Let's assume that you were creating your own blogging system. We'll assume initially that you have need want to create posts and you want to allow multiple users to author articles.

Storing the data in a hierarchical format with XML is fairly straightforward. Each 'user' is represented by a node named 'user' with a child 'contents' node to contain the user's blog posts.

```
