filmtools/filmspeed
Composer 安装命令:
composer require filmtools/filmspeed
包简介
Interfaces, classes and traits for film speed information
README 文档
README
Interfaces, classes and traits for film speed information
FilmSpeed classes
<?php use FilmTools\FilmSpeed\AsaFilmSpeed; use FilmTools\FilmSpeed\DinFilmSpeed; $asa = 100; $s1 = new AsaFilmSpeed( $asa ); $s1->getAsa(); // 100 $s1->getDin(); // 21 $s1->getIso(); // "ISO 100/21°" $din = 27; $s2 = new DinFilmSpeed( $din ); $s2->getAsa(); // 400 $s2->getDin(); // 27 $s2->getIso(); // "ISO 400/27°"
Interfaces
FilmSpeedInterface
use FilmTools\FilmSpeed\FilmSpeedInterface; // Returns the Film speed as DIN number. // Because the value may be calculated, this value is float. public function getDin() : float; // Returns the Film speed as ASA number. //Because the value may be calculated, this value is float. public function getAsa() : float; // Returns the Film speed as ISO-formatted string like "ISO 400/27°" public function getIso() : string;
FilmSpeedProvider Interface and Trait
The FilmSpeedProviderTrait provides a protected $filmspeed attribute. It helps to fulfill the FilmSpeedProviderInterface.
use FilmTools\FilmSpeed\FilmSpeedProviderInterface; use FilmTools\FilmSpeed\FilmSpeedProviderTrait; // Returns the Film speed. public function getFilmSpeed() : FilmSpeedInterface;
FilmSpeedAwareInterface
The FilmSpeedAwareTrait provides a setFilmSpeed setter method. It also uses the FilmSpeedProviderTrait.
use FilmTools\FilmSpeed\FilmSpeedAwareInterface; use FilmTools\FilmSpeed\FilmSpeedAwareTrait; // Sets the Film speed. public function setFilmSpeed( FilmSpeedInterface $filmspeed );
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-25