Skip to content

Commit

Permalink
Merge pull request #37 from cultuurnet/feature/WKS-367
Browse files Browse the repository at this point in the history
feature/WKS-367: Parse the "externalid" page property
  • Loading branch information
zuuperman committed Dec 3, 2018
2 parents 5fcd9bd + 5912343 commit baebc04
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
language: php
php:
- 5.6
- 5.5
- 5.4
- 5.3
install: composer install
script: ./vendor/bin/phing test
after_success: ./vendor/bin/phing report-to-coveralls
Expand Down
31 changes: 31 additions & 0 deletions lib/CultureFeed/Cdb/Item/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ class CultureFeed_Cdb_Item_Page implements CultureFeed_Cdb_IElement
protected $tagline;

/**
* The external Id of the page.
*
* @var string
*/
protected $externalId;


/**
* Get the id of this page.
* @return string
*/
Expand Down Expand Up @@ -386,7 +394,27 @@ public function setTagline($tagline)
$this->tagline = $tagline;
}


/**
* Set the external id of this page.
* @param string $externalId
*/
public function setExternalId($externalId)
{
$this->externalId = $externalId;
}

/**
* Get the external id of this page.
* @return string
*/
public function getExternalId()
{
return $this->externalId;
}


/**
* @see CultureFeed_Cdb_IElement::appendToDOM()
*/
public function appendToDOM(DOMElement $element)
Expand Down Expand Up @@ -545,6 +573,9 @@ public static function parseFromCdbXml(SimpleXMLElement $xmlElement)
// Set tagline.
$page->setTagline((string) $xmlElement->tagline);

// Set external id.
$page->setExternalId((string) $xmlElement->externalid);

return $page;
}
}

0 comments on commit baebc04

Please sign in to comment.