PHPackages                             iofficedk/mybasemodel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. iofficedk/mybasemodel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

iofficedk/mybasemodel
=====================

extend your PHP model

v1.0.7(5y ago)023MITPHPPHP &gt;=7.0.0

Since Feb 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/iofficedk/myBaseModel)[ Packagist](https://packagist.org/packages/iofficedk/mybasemodel)[ RSS](/packages/iofficedk-mybasemodel/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (9)Used By (0)

myBaseModel
===========

[](#mybasemodel)

With myBaseModel you can extends your own models and get some extra query functions. It is meant to be simple and NOT laravel illuminate. :) I used to use it first in a project to quickly getting a "working" model to show if a framework are not choosen yet and in small scripts.

### Using

[](#using)

Setup .io.json with the section

```
{
    "mysql": {
        "default": {
            "host": "localhost",
            "user": "",
            "pass": "",
            "base": "",
            "port": "3306"
        }
    }
}

```

```
namespace App\Model;

Class Users extends \Io\Model\Base\myBaseModel
{
    protected $table = 'user';
}
```

### Single call :

[](#single-call-)

```
$User = Users::new()
$User = Users::id({row id})
$User = Users::sql({query})

```

### Multi call

[](#multi-call)

```
::where({field}, {Operator}, {value})
::whereOr({field}, {Operator}, {value})
::fields([{field name}])
::sort({field name DESC|ASC})

ex. $Users = Users::where('active', 'IS NOT NULL')->fields('name')->sort('name DESC');

```

### Resource

[](#resource)

```
$Users->count()
$Users->next()
$Users->getArray()

```

### Result

[](#result)

```
$User = $Users->next()

$User->{fieldname}
$User->isReady()
$User->getId()
$User->getObject()

$Status = $User->save()
$Status = $User->delete()

ex. $User = $Users->next()
if ($User)
{
    return $User->name;
}

```

### Saving | Deleting

[](#saving--deleting)

```
$Status->success
$Status->updated
$Status->created
$Status->matched
$Status->warning
$Status->error

```

### Install

[](#install)

```
$ composer require iofficedk/mybasemodel
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Recently: every ~30 days

Total

8

Last Release

2148d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/52b8f030457b6091645decfe59d5f4765f625c1a452ede7836af499a327a9daf?d=identicon)[iofficedk](/maintainers/iofficedk)

---

Top Contributors

[![iofficedk](https://avatars.githubusercontent.com/u/60752922?v=4)](https://github.com/iofficedk "iofficedk (12 commits)")

---

Tags

extendphp model

### Embed Badge

![Health badge](/badges/iofficedk-mybasemodel/health.svg)

```
[![Health](https://phpackages.com/badges/iofficedk-mybasemodel/health.svg)](https://phpackages.com/packages/iofficedk-mybasemodel)
```

###  Alternatives

[marcelog/pami

Asterisk Manager Interface (AMI) client for PHP, event driven, object oriented

415750.6k1](/packages/marcelog-pami)[geedmo/yamm3

Yet another megamenu for Bootstrap 3.x

1.2k12.6k](/packages/geedmo-yamm3)[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[fusonic/opengraph

PHP library for consuming and publishing Open Graph resources.

104373.0k4](/packages/fusonic-opengraph)[bentools/iterable-functions

Provides functions for iterable variables: is\_iterable(), iterable\_to\_array()

23404.2k23](/packages/bentools-iterable-functions)[thruway/client

Thruway WAMP client

11822.8k6](/packages/thruway-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
