-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added MimeInfo Node + Test update (#2)
- Loading branch information
1 parent
24154b7
commit c761067
Showing
10 changed files
with
360 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?php | ||
/** | ||
* This file is part of the BMEcat php library | ||
* | ||
* (c) Sven Eisenschmidt <sven.eisenschmidt@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace SE\Component\BMEcat\Node; | ||
|
||
use \JMS\Serializer\Annotation as Serializer; | ||
use \SE\Component\BMEcat\Node\AbstractNode; | ||
|
||
/** | ||
* Class MimeInfoNode | ||
* @package SE\Component\BMEcat\Node | ||
* @author Jan Kahnt <j.kahnt@impericon.com> | ||
* | ||
* @Serializer\XmlRoot("MIME") | ||
*/ | ||
class MimeNode extends AbstractNode { | ||
|
||
/** | ||
* @Serializer\Expose | ||
* @Serializer\Type("string") | ||
* @Serializer\SerializedName("MIME_TYPE") | ||
* | ||
* @var string | ||
*/ | ||
protected $type; | ||
|
||
/** | ||
* @Serializer\Expose | ||
* @Serializer\Type("string") | ||
* @Serializer\SerializedName("MIME_SOURCE") | ||
* | ||
* @var string | ||
*/ | ||
protected $source; | ||
|
||
/** | ||
* @Serializer\Expose | ||
* @Serializer\Type("string") | ||
* @Serializer\SerializedName("MIME_PURPOSE") | ||
* | ||
* @var string | ||
*/ | ||
protected $purpose; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getType() | ||
{ | ||
return $this->type; | ||
} | ||
|
||
/** | ||
* @param string $type | ||
*/ | ||
public function setType($type) | ||
{ | ||
$this->type = $type; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getSource() | ||
{ | ||
return $this->source; | ||
} | ||
|
||
/** | ||
* @param string $source | ||
*/ | ||
public function setSource($source) | ||
{ | ||
$this->source = $source; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getPurpose() | ||
{ | ||
return $this->purpose; | ||
} | ||
|
||
/** | ||
* @param string $purpose | ||
*/ | ||
public function setPurpose($purpose) | ||
{ | ||
$this->purpose = $purpose; | ||
} | ||
} |
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
6 changes: 6 additions & 0 deletions
6
tests/SE/Component/BMEcat/Tests/Fixtures/empty_mime_info_with_null_values.xml
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,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<MIME xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<MIME_TYPE xsi:nil="true"/> | ||
<MIME_SOURCE xsi:nil="true"/> | ||
<MIME_PURPOSE xsi:nil="true"/> | ||
</MIME> |
2 changes: 2 additions & 0 deletions
2
tests/SE/Component/BMEcat/Tests/Fixtures/empty_mime_info_without_null_values.xml
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,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<MIME/> |
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
Oops, something went wrong.