mouf/utils.value.value-interface 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mouf/utils.value.value-interface

最新稳定版本:v1.0.0

Composer 安装命令:

composer require 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.

README 文档

README

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

This package is part of Mouf (http://mouf-php.com), an effort to ensure good developing practices by providing a graphical dependency injection framework.

统计信息

  • 总下载量: 530.04k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 12
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 10
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固