Skip to content

Commit

Permalink
fix interface implementation for CollectionType (parameter hint was n…
Browse files Browse the repository at this point in the history
…ot correct)
  • Loading branch information
pscheit committed Sep 9, 2015
1 parent d6ea535 commit 9bf0e2b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/Webforge/Types/CollectionType.php
Expand Up @@ -34,6 +34,7 @@ public function __construct($implementation = NULL, Type $innerType = NULL) {
}

$this->implementation = $implementation;
$this->interfaceClass = GClassAdapter::newGClass($this->getInterface());

parent::__construct($implementation);

Expand Down Expand Up @@ -110,6 +111,24 @@ public function getInterface() {
//return $this->getInterfaceDefinition('Collection');
}

/**
* @inheritdoc
*/
public function getParameterHint($useFQN = TRUE) {
if ($useFQN) {
return '\\'.$this->interfaceClass->getFQN();
} else {
return $this->interfaceClass->getName();
}
}

/**
* @inheritdoc
*/
public function getParameterHintImport() {
return $this->interfaceClass;
}

public function getSerializationType() {
return 'ArrayCollection';
}
Expand Down

0 comments on commit 9bf0e2b

Please sign in to comment.