/** * @param string[] $line Array of words */ public function __construct($line) { $this->annotationName = $line[0]; if (isset($line[1])) { $this->params[0] = ezcReflectionTypeMapper::getInstance()->getTypeName($line[1]); } if (isset($line[2])) { $this->desc = $line[2]; } if (isset($line[3])) { $this->desc .= ' ' . $line[3]; } }
/** * @param string[] $line Array of words */ public function __construct($line) { $this->annotationName = $line[0]; if (isset($line[1])) { $this->params[0] = ezcReflectionTypeMapper::getInstance()->getTypeName($line[1]); } if (isset($line[2]) and strlen($line[2]) > 0) { if ($line[2][0] == '$') { $line[2] = substr($line[2], 1); } $this->params[1] = $line[2]; } if (isset($line[3])) { $this->desc = $line[3]; } }
/** * Returns name of the correspondent XML Schema datatype * * The prefix `xsd' is comonly used to refer to the * XML Schema namespace. * * @param boolean $usePrefix augments common prefix `xsd:' to the name * @return string */ function getXmlName($usePrefix = true) { if ($usePrefix) { $prefix = 'xsd:'; } else { $prefix = ''; } return $prefix . ezcReflectionTypeMapper::getInstance()->getXmlType($this->getTypeName()); }
/** * Constructs a type factory implementation */ public function __construct() { $this->mapper = ezcReflectionTypeMapper::getInstance(); }
public function testGetXmlTypeWithNonExistingType() { self::assertNull(ezcReflectionTypeMapper::getInstance()->getXmlType('NonExistingType')); }