Skip to content

Commit a9d2c14

Browse files
committed
Merge pull request #10 from ojhaujjwal/feature/apparent-power
Created new quantity, 'ApparentPower'
2 parents 909405b + 81f6521 commit a9d2c14

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/*
3+
* This file is part of Conversion.
4+
*
5+
* (c) 2013 Christoffer Niska
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
11+
namespace Crisu83\Conversion\Quantity\ApparentPower;
12+
13+
use Crisu83\Conversion\Quantity\Quantity;
14+
15+
/**
16+
* Class ApparentPower
17+
* @package Crisu83\Conversion\Quantity\ApparentPower
18+
*/
19+
class ApparentPower extends Quantity
20+
{
21+
/**
22+
* @var string native unit name
23+
*/
24+
protected static $native = Unit::VOLT_AMPERE;
25+
26+
/**
27+
* @var array conversion map (unit => native unit)
28+
*/
29+
protected static $conversionMap = array(
30+
Unit::VOLT_AMPERE => 1,
31+
Unit::KILOVOLT_AMPERE => 1000,
32+
);
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/*
3+
* This file is part of Conversion.
4+
*
5+
* (c) 2013 Christoffer Niska
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
11+
namespace Crisu83\Conversion\Quantity\ApparentPower;
12+
13+
use Crisu83\Conversion\Quantity\Unit as BaseUnit;
14+
15+
/**
16+
* Class Unit
17+
* @package Crisu83\Conversion\Quantity\ApparentPower
18+
*/
19+
class Unit extends BaseUnit
20+
{
21+
const VOLT_AMPERE = 'VA';
22+
const KILOVOLT_AMPERE = 'kVA';
23+
}

0 commit comments

Comments
 (0)