public function install($source)
    {
        $pattern                             = chr(1) . '^' . preg_quote(JPATH_ROOT) . '/' . chr(1);
        $this->extensions[basename($source)] = preg_replace($pattern, '', $source);

        $xmlDirectory = $source . '/entities';
        $strategy     = new RecursiveDirectoryStrategy($xmlDirectory);
        $this->builder->addLocatorStrategy($strategy);
        $entityNames = $this->importDefinition($xmlDirectory . '/*.xml');

        foreach ($entityNames as $entityName) {
            $this->dataDirectories[$entityName] = $source . '/data';
        }

        return $entityNames;
    }
public function install($source)
    {
        $pattern                             = chr(1) . '^' . preg_quote(JPATH_ROOT) . '/' . chr(1);
        $this->extensions[basename($source)] = preg_replace($pattern, '', $source);

        $xmlDirectory = $source . '/entities';
        $strategy     = new RecursiveDirectoryStrategy($xmlDirectory);
        $this->builder->addLocatorStrategy($strategy);
        $entityNames = $this->importDefinition($xmlDirectory . '/*.xml');

        foreach ($entityNames as $entityName) {
            $this->dataDirectories[$entityName] = $source . '/data';
        }

        return $entityNames;
    }
public function install ( $ source ) { $ pattern = chr ( 1 ) . '^' . preg_quote ( JPATH_ROOT ) . '/' . chr ( 1 ) ; $ this -> extensions [ basename ( $ source ) ] = preg_replace ( $ pattern , '' , $ source ) ; $ xmlDirectory = $ source . '/entities' ; $ strategy = new RecursiveDirectoryStrategy ( $ xmlDirectory ) ; $ this -> builder -> addLocatorStrategy ( $ strategy ) ; $ entityNames = $ this -> importDefinition ( $ xmlDirectory . '/*.xml' ) ; foreach ( $ entityNames as $ entityName ) { $ this -> dataDirectories [ $ entityName ] = $ source . '/data' ; } return $ entityNames ; }
Installs an extension

@param   string $source The path to the extension

@return  string[]
Installs an extension