filmtools / ndeviation
用于电影制作中区域系统偏差的接口、类和特性
1.1.2
2021-01-17 11:22 UTC
Requires
- php: ^7.1|^8.0
- twig/twig: ^2.0
Requires (Dev)
- php-coveralls/php-coveralls: ^2.0
- phpspec/prophecy-phpunit: ^2.0
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^7.0|^8.0|^9.0
- spatie/phpunit-watcher: ^1.8
This package is auto-updated.
Last update: 2024-09-17 19:27:16 UTC
README
区域系统偏差的接口、类和特性
安装
$ composer require filmtools/ndeviation
NDeviation 类
<?php use FilmTools\NDeviation\NDeviation; use FilmTools\NDeviation\NDeviationFormatter; // Short title is optional; $ndev = new NDeviation( 2 ); $ndev = new NDeviation( 2, "push +2" ); // Grab values $ndev->getValue(); // 2.0 $ndev->getType(); // "push +2" // Nice formatting: $formatter = new NDeviationFormatter; echo $formatter( $ndev ); // "𝑵 +2" // …can cope with strings echo $formatter( "2.2" ); // "𝑵 +2.2" echo $formatter( "foo" ); // "foo"
接口
NDeviationInterface
use FilmTools\NDeviation\NDeviationInterface; public function getValue() : ?float; public function getType() : ?string; public function valid() : bool;
NDeviationProviderInterface
use FilmTools\NDeviation\NDeviationInterface; use FilmTools\NDeviation\NDeviationProviderInterface; public function getNDeviation() : NDeviationInterface;