2017-08-18 22:57:27 +02:00
|
|
|
<?php declare(strict_types=1);
|
2011-09-24 16:53:40 +02:00
|
|
|
|
2014-02-06 14:44:16 +01:00
|
|
|
namespace PhpParser\Node\Name;
|
|
|
|
|
|
|
|
class Relative extends \PhpParser\Node\Name
|
2011-09-24 16:53:40 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Checks whether the name is unqualified. (E.g. Name)
|
|
|
|
*
|
|
|
|
* @return bool Whether the name is unqualified
|
|
|
|
*/
|
2017-04-28 21:40:59 +02:00
|
|
|
public function isUnqualified() : bool {
|
2011-09-24 16:53:40 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks whether the name is qualified. (E.g. Name\Name)
|
|
|
|
*
|
|
|
|
* @return bool Whether the name is qualified
|
|
|
|
*/
|
2017-04-28 21:40:59 +02:00
|
|
|
public function isQualified() : bool {
|
2011-09-24 16:53:40 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks whether the name is fully qualified. (E.g. \Name)
|
|
|
|
*
|
|
|
|
* @return bool Whether the name is fully qualified
|
|
|
|
*/
|
2017-04-28 21:40:59 +02:00
|
|
|
public function isFullyQualified() : bool {
|
2011-09-24 16:53:40 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
|
|
|
|
*
|
|
|
|
* @return bool Whether the name is relative
|
|
|
|
*/
|
2017-04-28 21:40:59 +02:00
|
|
|
public function isRelative() : bool {
|
2011-09-24 16:53:40 +02:00
|
|
|
return true;
|
|
|
|
}
|
2017-04-28 17:10:30 +02:00
|
|
|
|
2017-04-28 21:40:59 +02:00
|
|
|
public function toCodeString() : string {
|
2017-04-28 17:10:30 +02:00
|
|
|
return 'namespace\\' . $this->toString();
|
|
|
|
}
|
2017-11-12 21:25:57 +01:00
|
|
|
|
2018-01-10 18:57:48 +01:00
|
|
|
public function getType() : string {
|
2017-11-12 21:25:57 +01:00
|
|
|
return 'Name_Relative';
|
|
|
|
}
|
2018-01-10 18:04:06 +01:00
|
|
|
}
|