PHPackages                             jzfpost/yii2-dynamicfinder - 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. [Framework](/categories/framework)
4. /
5. jzfpost/yii2-dynamicfinder

ActiveYii2-extension[Framework](/categories/framework)

jzfpost/yii2-dynamicfinder
==========================

Dynamic finder trait for Yii2-framework

1.2.2(5y ago)11UnlicensePHP

Since Jan 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jzfpost/yii2-dynamicfinder)[ Packagist](https://packagist.org/packages/jzfpost/yii2-dynamicfinder)[ RSS](/packages/jzfpost-yii2-dynamicfinder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

yii2-dynamicfinder
==================

[](#yii2-dynamicfinder)

Dynamic finder trait for Yii2-framework ActiveRecord models

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist jzfpost/yii2-dynamicfinder "*"

```

or add

```
"jzfpost/yii2-dynamicfinder": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

### Model

[](#model)

```
use jzfpost\dynamicfinder\DynamicFinderTrait;

class Customer extends \yii\db\ActiveRecord
{
    use DynamicFinderTrait;

your code...
}
```

### Controller

[](#controller)

```
$model = Customer::findOneByEmail($email);  // return Customer::find()->where(['email' => $email])->one();
$customers = Customer::findAllByEmail($email);  // return Customer::find()->where(['email' => $email])->all();
$count = Customer::findCountByEmail($email);  // return Customer::find()->where(['email' => $email])->count();

$username = Customer::findUsernameByEmail($email); // return username value where email=$email;
$updatedAt = Customer::findUpdatedAtByEmailOrUsername($email, $username); // return updated_at value where email=$email or username = $username;
$createdAt = Customer::findCreatedAtByEmailAndUsername($email, $username); // return created_at value where email=$email and username = $username;

$customers = Customer::findByEmail($email) equivalently Customer::findAllByEmail($email);
```

### Syntax

[](#syntax)

```
findBy(field_value)
findBy(field_value)
findByAnd(field_value1, field_value2)
findByOr(field_value1, field_value2)

```

where:

> 'Select' may by 'All', 'One', 'Count' or one of model attribute. If 'Select' not set, by default return 'All'.

> 'Field' is model attribute on where condition.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~916 days

Total

2

Last Release

2126d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a4081edb920ba0769fd89f49469816a95ce9afcb87b5562d7b9a035583b419e?d=identicon)[jzfpost](/maintainers/jzfpost)

---

Top Contributors

[![jzfpost](https://avatars.githubusercontent.com/u/12181074?v=4)](https://github.com/jzfpost "jzfpost (23 commits)")

---

Tags

yii2yii2

### Embed Badge

![Health badge](/badges/jzfpost-yii2-dynamicfinder/health.svg)

```
[![Health](https://phpackages.com/badges/jzfpost-yii2-dynamicfinder/health.svg)](https://phpackages.com/packages/jzfpost-yii2-dynamicfinder)
```

###  Alternatives

[yiisoft/yii2-twig

The Twig integration for the Yii framework

1431.9M32](/packages/yiisoft-yii2-twig)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[devanych/yii2-cart

Shopping cart for Yii2

2011.2k](/packages/devanych-yii2-cart)[tecnocen/yii2-formgenerator

Yii 2 Library to configure form generator

145.7k](/packages/tecnocen-yii2-formgenerator)

PHPackages © 2026

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