PhpBrew\Extension\Extension::getSharedLibraryName PHP Method

getSharedLibraryName() public method

    public function getSharedLibraryName()
    {
        if ($this->sharedLibraryName) {
            return $this->sharedLibraryName;
        }
        return strtolower($this->extensionName) . '.so';
        // for windows it might be a DLL.
    }

Usage Example

Ejemplo n.º 1
0
 public function createExtensionConfig(Extension $ext)
 {
     $sourceDir = $ext->getSourceDirectory();
     $ini = $ext->getConfigFilePath() . '.disabled';
     $this->logger->info("===> Creating config file {$ini}");
     if (!file_exists(dirname($ini))) {
         mkdir(dirname($ini), 0755, true);
     }
     // create extension config file
     if (file_exists($ini)) {
         return;
     }
     if ($ext->isZend()) {
         $makefile = file_get_contents("{$sourceDir}/Makefile");
         preg_match('/EXTENSION\\_DIR\\s=\\s(.*)/', $makefile, $regs);
         $content = 'zend_extension=' . $ext->getSharedLibraryPath();
     } else {
         $content = 'extension=' . $ext->getSharedLibraryName();
     }
     file_put_contents($ini, $content);
     $this->logger->debug("{$ini} is created.");
 }