public static getNodeNameFromPath ( string $path ) : string | ||
$path | string | |
return | string |
public static function getNodeNameFromPath($path)
{
return $path === '/' ? '' : substr($path, strrpos($path, '/') + 1);
}
/** * Returns the name of this node * * @return string */ public function getName() { return NodePaths::getNodeNameFromPath($this->path); }