N98\Util\OperatingSystem::getCwd PHP Метод

getCwd() публичный статический Метод

get current working directory
public static getCwd ( ) : string
Результат string the current working directory on success, or false on failure.
    public static function getCwd()
    {
        return getcwd();
    }

Usage Example

Пример #1
0
 /**
  * Search for magento root folder
  *
  * @param InputInterface|null $input [optional]
  * @param OutputInterface|null $output [optional]
  * @return void
  */
 public function detectMagento(InputInterface $input = null, OutputInterface $output = null)
 {
     // do not detect magento twice
     if ($this->_magentoDetected) {
         return;
     }
     if ($this->getMagentoRootFolder() === null) {
         $this->_checkRootDirOption();
         $folder = OperatingSystem::getCwd();
     } else {
         $folder = $this->getMagentoRootFolder();
     }
     $this->getHelperSet()->set(new MagentoHelper($input, $output), 'magento');
     $magentoHelper = $this->getHelperSet()->get('magento');
     /* @var $magentoHelper MagentoHelper */
     if (!$this->_directRootDir) {
         $subFolders = $this->config->getDetectSubFolders();
     } else {
         $subFolders = array();
     }
     $this->_magentoDetected = $magentoHelper->detect($folder, $subFolders);
     $this->_magentoRootFolder = $magentoHelper->getRootFolder();
     $this->_magentoEnterprise = $magentoHelper->isEnterpriseEdition();
     $this->_magentoMajorVersion = $magentoHelper->getMajorVersion();
     $this->_magerunStopFileFound = $magentoHelper->isMagerunStopFileFound();
     $this->_magerunStopFileFolder = $magentoHelper->getMagerunStopFileFolder();
 }
All Usage Examples Of N98\Util\OperatingSystem::getCwd