PHPackages                             yuav/mogilefs - 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. yuav/mogilefs

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

yuav/mogilefs
=============

MogileFS PHP Model

1.2(12y ago)137264PHPPHP &gt;=5.3.3

Since Oct 26Pushed 9y ago5 watchersCompare

[ Source](https://github.com/Yuav/MogileFS-PHP-Model)[ Packagist](https://packagist.org/packages/yuav/mogilefs)[ Docs](https://github.com/Yuav/MogileFS-PHP-Model)[ RSS](/packages/yuav-mogilefs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

MogileFS PHP Model
==================

[](#mogilefs-php-model)

[![Build Status](https://camo.githubusercontent.com/70a16bb9786f8eb8ad15c2884f11b98daa8f60b050008d144716bf9471606960/68747470733a2f2f7472617669732d63692e6f72672f597561762f4d6f67696c6546532d5048502d4d6f64656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Yuav/MogileFS-PHP-Model)

This library is an abstraction model for a file stored in MogileFS. The idea is to have a clearly defined api to use for storing and retrieving files from MogileFS.

On find, only paths are retrieved by default, while other properties like domain and class are lazyloaded on request.

This model also include a mysql adapter, as a hack to do bulk operations for looking up multiple paths in one operation. This adapter is likely to break for future MogileFS versions, but MogileFS currently doesn’t support getting multiple paths in one query natively.

Example usage
-------------

[](#example-usage)

add with composer

```
{
    "require": {
        "yuav/mogilefs": "dev-master"
    }
}
```

```
