public function getInterfaces() {
if ($this->interfaces !== NULL) {
return $this->interfaces;
}
if (!$this
->hasInterfaces()) {
return $this->interfaces = FALSE;
}
if ($this->tokenStream[$this->id + 4] instanceof PHP_Token_IMPLEMENTS) {
$i = $this->id + 3;
}
else {
$i = $this->id + 7;
}
$tokens = $this->tokenStream
->tokens();
while (!$tokens[$i + 1] instanceof PHP_Token_OPEN_CURLY) {
$i++;
if ($tokens[$i] instanceof PHP_Token_STRING) {
$this->interfaces[] = (string) $tokens[$i];
}
}
return $this->interfaces;
}