-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added interior measurements elements handling
- Loading branch information
Showing
4 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
namespace eiriksm\FinnTransfer\Traits; | ||
|
||
trait InteriorMeasurementsTrait | ||
{ | ||
|
||
/** | ||
* @var \DOMElement | ||
*/ | ||
protected $interiorMeasurementsBody; | ||
|
||
/** | ||
* @var \DOMElement | ||
*/ | ||
protected $interiorMeasurementsLengthBody; | ||
|
||
/** | ||
* @var \DOMElement | ||
*/ | ||
protected $interiorMeasurementsWidthBody; | ||
|
||
/** | ||
* @var \DOMElement | ||
*/ | ||
protected $interiorMeasurementsHeightBody; | ||
|
||
public function setInteriorMeasurements() | ||
{ | ||
if (!isset($this->interiorMeasurementsBody)) { | ||
$this->createInteriorMeasurementsElements(); | ||
} | ||
} | ||
|
||
protected function createInteriorMeasurementsElements() | ||
{ | ||
$this->interiorMeasurementsBody = $this->dom->createElement('INTERIOR_MEASUREMENTS'); | ||
$this->interiorMeasurementsLengthBody = $this->dom->createElement('LENGTH'); | ||
$this->interiorMeasurementsWidthBody = $this->dom->createElement('WIDTH'); | ||
$this->interiorMeasurementsHeightBody = $this->dom->createElement('HEIGHT'); | ||
$this->interiorMeasurementsBody->appendChild($this->interiorMeasurementsHeightBody); | ||
$this->interiorMeasurementsBody->appendChild($this->interiorMeasurementsWidthBody); | ||
$this->interiorMeasurementsBody->appendChild($this->interiorMeasurementsLengthBody); | ||
$this->adBody->appendChild($this->interiorMeasurementsBody); | ||
} | ||
|
||
public function setInteriorMeasurementsLength($length) | ||
{ | ||
$this->interiorMeasurementsLengthBody->nodeValue = $length; | ||
} | ||
|
||
public function setInteriorMeasurementsWidth($width) | ||
{ | ||
$this->interiorMeasurementsWidthBody->nodeValue = $width; | ||
} | ||
|
||
public function setInteriorMeasurementsHeight($height) | ||
{ | ||
$this->interiorMeasurementsHeightBody->nodeValue = $height; | ||
} | ||
} |