PHPackages                             mouf/utils.value.value-interface - 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. mouf/utils.value.value-interface

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

mouf/utils.value.value-interface
================================

This package contains an interface used by many objects to say they represent a value that can be computed. The concept is very simple, and very powerful at the same time.

v1.0.0(12y ago)1540.7k↓15.6%12MITPHPPHP &gt;=5.3.0

Since Oct 29Pushed 11y ago10 watchersCompare

[ Source](https://github.com/thecodingmachine/utils.value.value-interface)[ Packagist](https://packagist.org/packages/mouf/utils.value.value-interface)[ Docs](https://mouf-php.com/mouf/utils.value.value-interface)[ RSS](/packages/mouf-utilsvaluevalue-interface/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (12)

What is this package
====================

[](#what-is-this-package)

This package contains an interface used by many objects to declare they represent a unique value.

If your objects represent a single value, they should implement *ValueInterface*. An object implementing this interface will return a single value when the "val()" method is called. The value can be anything (if you want the value to be a string, a bool, an array or something else, use one of the subinterfaces provided, like StringValueInterface for instance).

This is a very simple and very powerful system.

```
namespace Mouf\Utils\Value;

interface ValueInterface {
	/**
	 * Returns the value represented by this object.
	 *
	 * @return mixed
	 */
	public function val();
}
```

Here are a few samples:

- a class that represents one GET or POST parameter
- a class that represents the result of a complex operation
- a class that represents a user bean
- a class that represents whether the current user has some right
- ...

This package does not only contains the *ValueInterface* interface. It also contains a number of more specialized interfaces that extend *ValueInterface* and that represent specific values (like a string or a bool).

Here is a list of all interfaces available in this package:

- ValueInterface
    - ScalarValueInterface
        - StringValueInterface
        - BoolValueInterface
        - NumberValueInterface
            - IntValueInterface
    - ObjectValueInterface
    - ArrayValueInterface
        - MapValueInterface

Mouf package
------------

[](#mouf-package)

This package is part of Mouf (), an effort to ensure good developing practices by providing a graphical dependency injection framework.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity58

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

Total

2

Last Release

4584d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (7 commits)")

---

Tags

interfacemoufvalue

### Embed Badge

![Health badge](/badges/mouf-utilsvaluevalue-interface/health.svg)

```
[![Health](https://phpackages.com/badges/mouf-utilsvaluevalue-interface/health.svg)](https://phpackages.com/packages/mouf-utilsvaluevalue-interface)
```

###  Alternatives

[nette/robot-loader

🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.

89352.7M321](/packages/nette-robot-loader)[samrap/acf-fluent

A fluent interface for the Advanced Custom Fields WordPress plugin

28656.0k4](/packages/samrap-acf-fluent)[brysem/phpenums

Enums made simple in PHP.

10171.5k](/packages/brysem-phpenums)

PHPackages © 2026

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