protected function checkDirectory()
{
$namespace = $this->config->get('namespace');
if (!$namespace) {
throw new Exception("Extension namespace cannot be loaded");
}
if (!is_string($namespace)) {
throw new Exception("Extension namespace is invalid");
}
if (!$this->fileSystem->isInitialized()) {
$this->fileSystem->initialize();
}
$version = self::getCurrentVersion();
if (!$this->fileSystem->exists($version)) {
if (!$this->checkIfPhpized()) {
$this->logger->output('Zephir version has changed, use "zephir fullclean" to perform a full clean of the project');
}
$this->fileSystem->makeDirectory($version);
}
return $namespace;
}