protected function traceZip($archive, $tempPath)
    {
        if (!$archive = $this->extractZip($archive, $tempPath, true))
            return array(false, null);

        //Check module has requires file
        if (!$this->checkRequires($tempPath))
            return array(false, null);

        $moduleName = $this->def($tempPath, 'name', true);

        if ($this->moduleExists($moduleName))
            return array($this->update($tempPath, $moduleName), $moduleName);

        else
            return array($this->install($tempPath, $moduleName), $moduleName);
    }
protected function traceZip($archive, $tempPath)
    {
        if (!$archive = $this->extractZip($archive, $tempPath, true))
            return array(false, null);

        //Check module has requires file
        if (!$this->checkRequires($tempPath))
            return array(false, null);

        $moduleName = $this->def($tempPath, 'name', true);

        if ($this->moduleExists($moduleName))
            return array($this->update($tempPath, $moduleName), $moduleName);

        else
            return array($this->install($tempPath, $moduleName), $moduleName);
    }
protected function traceZip ( $ archive , $ tempPath ) { if ( ! $ archive = $ this -> extractZip ( $ archive , $ tempPath , true ) ) return array ( false , null ) ; //Check module has requires file if ( ! $ this -> checkRequires ( $ tempPath ) ) return array ( false , null ) ; $ moduleName = $ this -> def ( $ tempPath , 'name' , true ) ; if ( $ this -> moduleExists ( $ moduleName ) ) return array ( $ this -> update ( $ tempPath , $ moduleName ) , $ moduleName ) ; else return array ( $ this -> install ( $ tempPath , $ moduleName ) , $ moduleName ) ; }
Step by Step to install or update a module zip

@param string $archive path of zip
@param string $tempPath path of extract zip
@return array array(bool $result, string $moduleName)
Step by Step to install or update a module zip