1. Go to this page and download the library: Download filmtools/standards library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
filmtools / standards example snippets
use FilmTools\Standards\StandardInterface;
// Returns a name or short description of this developing standard.
public function getName() : string;
// Returns the minimum film density of interest
public function getDmin() : float;
// Returns the maximum film density of interest
public function getDmax() : float;
// Returns the file path to CSV with norm data
public function getNormDataFile() : string;
use FilmTools\Standards\StandardProviderInterface;
// Returns the Standard instance, or null.
public function getStandard() : ?StandardInterface;
use FilmTools\Standards\StandardProviderTrait;
use FilmTools\Standards\StandardProviderInterface;
class MyClass implements StandardProviderInterface {
use StandardProviderTrait;
}
$foo = new MyClass;
print_r( $foo->standard );
print_r( $foo->getStandard() );
use FilmTools\Standards\StandardAwareInterface;
// Sets the Standard instance.
public function setStandard( StandardInterface $standard);
use FilmTools\Standards\StandardAwareTrait;
use FilmTools\Standards\StandardAwareInterface;
use FilmTools\Standards\TraditionalStandard;
class MyClass implements StandardAwareInterface {
use StandardAwareTrait;
}
$foo = new MyClass;
$foo->setStandard( new TraditionalStandard );
print_r( $foo->standard );
print_r( $foo->getStandard() );
use FilmTools\Standards\StandardsFactory;
$standard_factory = new StandardsFactory;
$standard_factory = new StandardsFactory("iso6");
// Call without standard name
$standard = $standard_factory();
echo get_class($standard);
// FilmTools\Standards\TraditionalStandard