dev-master
9999999-dev https://github.com/tiagobrito/PhpUnitsOfMeasureBundleSymfony PhpUnitsOfMeasureBundle
The Requires
by Tiago Brito
convert measure units
Symfony PhpUnitsOfMeasureBundle
The PhpUnitsOfMeasureBundle
provides integration of the php-units-of-measure library into the Symfony2 framework., (*1)
um_acceleration
um_angle
um_area
um_electric_current
um_length
um_luminous_intensity
um_mass
um_pressure
um_temperature
um_velocity
um_volume
``` php <?php, (*2)
// app/AppKernel.php public function registerBundles() { return array( // ... new Triplepoint\PhpUnitsOfMeasureBundle\TriplepointPhpUnitsOfMeasureBundle(), // ... ); }
```, (*3)
Convert filters :, (*4)
{{ '5000' | um_length('m', 'km') }}
convert 5000 meters to 5 kilometers, (*5)
{{ '0.5' | um_acceleration }}
convert 0.5 m/s2 to 6480 km/h2 using the default units, (*6)
Symfony PhpUnitsOfMeasureBundle
convert measure units