Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"php-curl-class/php-curl-class": "^4.6"
},
"require-dev": {
"mikey179/vfsstream": "1.5.*",
"phpunit/phpunit": "4.7.*",
"mikey179/vfsstream": "1.6.*",
"phpunit/phpunit": "4.8.*",
"phpdocumentor/phpdocumentor": "~2.8"
},
"autoload": {
Expand Down
25 changes: 25 additions & 0 deletions src/Document/Anchor.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Anchor extends Base {
protected $targetAnchorPosition;
protected $originAnchorPosition;
protected $targetComponentIdentifier;
protected $target;
protected $rangeStart;
protected $rangeLength;

Expand All @@ -37,6 +38,7 @@ protected function optional() {
'targetComponentIdentifier',
'rangeStart',
'rangeLength',
'target'
));
}

Expand Down Expand Up @@ -102,6 +104,29 @@ public function setTargetComponentIdentifier($value) {
return $this;
}

/**
* Setter for target.
*
* @param mixed $value
* A target ID.
*
* @return $this
*/
public function setTarget($value) {
$this->target = (string) $value;
return $this;
}

/**
* Getter for the target.
*
* @return string
* The Target identifier.
*/
public function getTarget() {
return $this->target;
}

/**
* Getter for rangeStart.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Document/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public function setVideoURL($videoURL) {
* Validates the keywords attribute.
*/
protected function validateKeywords($value) {
if (count($this->keywords) > 49) {
if ($this->keywords !== NULL && count($this->keywords) > 49) {
$this->triggerError('number of keywords limited to 50.');
return FALSE;
}
Expand Down