Skip to content

Commit

Permalink
Merge pull request #10 from ojhaujjwal/feature/apparent-power
Browse files Browse the repository at this point in the history
Created new quantity, 'ApparentPower'
  • Loading branch information
crisu83 committed Jun 17, 2014
2 parents 909405b + 81f6521 commit a9d2c14
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/Crisu83/Conversion/Quantity/ApparentPower/ApparentPower.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/*
* This file is part of Conversion.
*
* (c) 2013 Christoffer Niska
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Crisu83\Conversion\Quantity\ApparentPower;

use Crisu83\Conversion\Quantity\Quantity;

/**
* Class ApparentPower
* @package Crisu83\Conversion\Quantity\ApparentPower
*/
class ApparentPower extends Quantity
{
/**
* @var string native unit name
*/
protected static $native = Unit::VOLT_AMPERE;

/**
* @var array conversion map (unit => native unit)
*/
protected static $conversionMap = array(
Unit::VOLT_AMPERE => 1,
Unit::KILOVOLT_AMPERE => 1000,
);
}
23 changes: 23 additions & 0 deletions src/Crisu83/Conversion/Quantity/ApparentPower/Unit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/*
* This file is part of Conversion.
*
* (c) 2013 Christoffer Niska
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Crisu83\Conversion\Quantity\ApparentPower;

use Crisu83\Conversion\Quantity\Unit as BaseUnit;

/**
* Class Unit
* @package Crisu83\Conversion\Quantity\ApparentPower
*/
class Unit extends BaseUnit
{
const VOLT_AMPERE = 'VA';
const KILOVOLT_AMPERE = 'kVA';
}

0 comments on commit a9d2c14

Please sign in to comment.