PHP code example of filmtools / developing

1. Go to this page and download the library: Download filmtools/developing 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 / developing example snippets



use FilmTools\Developing\Developing;

$exposures = array( 0, 0.3, 0.6, 0.9);
$densities = array( 0, 0.1, 0.4, 0.6);
$dev_time = 600;

$developing = new Developing( $exposures, $densities, $dev_time);

use FilmTools\Commons\Exposures;
use FilmTools\Commons\Zones;
use FilmTools\Commons\FStops;
use FilmTools\Commons\Densities;

$exposures = new Exposure 0, 0.3, 0.6, 0.9 ]);
$exposures = new Zones([ 0, 1, 2, 3 ]);
$exposures = new FStops([ -5, -4, -3, -2 ]);
$densities = new Densities([  0, 0.1, 0.4, 0.6 ]);

$developing = new Developing( $exposures, $densities, 600);

use FilmTools\Commons\Exposures;
use FilmTools\Commons\Densities;

// Returns "Exposures" instance
public function getExposures() : ExposuresInterface;

// Returns "Densities" instance
public function getDensities() : DensitiesInterface;

// Returns the developing time.
public function getTime() : int;

// Countable
echo count($developing); // 4

// IteratorAggregate
foreach( $developing as $logH => $logD):
// noop
endforeach;

use Psr\Container\NotFoundExceptionInterface;
use FilmTools\Developing\ExposureNotFoundException;

// ContainerInterface
try {
  $bool = $developing->has( 99 ); // false
  $logD = $developing->get( 99 ); // FALSE  
}
catch (NotFoundExceptionInterface $e)
{
  echo get_class($e); // ExposureNotFoundException
}

class MyClass extends Developing
{ ... }

$developing_factory = new DevelopingFactory;
$developing_factory = new DevelopingFactory( MyClass::class );

$developing = $developing_factory([
	'time' => 600,
	'exposures' => [ 0, 0.3, 0.6, 0.9 ],
	'densities' => [ 0, 0.1, 0.4, 0.6 ],
]);

$time = 600;
$densities = [ 0, 0.1, 0.4, 0.6 ];

$developing = $developing_factory([
	'time'      => $time,
	'densities' => $densities,
	'zones'     => [ 0, 1, 2, 3 ],  
]);

$developing = $developing_factory([
	'time'      => $time,
	'densities' => $densities,
	'fstops'    => [ -5, -4, 0, 1, 3 ]
]);