PclZip::listContent PHP Метод

listContent() публичный Метод

--------------------------------------------------------------------------------
public listContent ( )
    public function listContent()
    {
        $v_result = 1;
        // ----- Reset the error handler
        $this->privErrorReset();
        // ----- Check archive
        if (!$this->privCheckFormat()) {
            return 0;
        }
        // ----- Call the extracting fct
        $p_list = array();
        if (($v_result = $this->privList($p_list)) != 1) {
            unset($p_list);
            return 0;
        }
        // ----- Return
        return $p_list;
    }

Usage Example

Пример #1
0
 public function open($Path)
 {
     $this->PclZip = new PclZip($Path);
     $Result = $this->_Contents = $this->PclZip->listContent();
     if (!$Result) {
         return ZipArchive::ER_READ;
     }
     $this->_Names = array();
     foreach ($this->_Contents as $Content) {
         $this->_Names[$Content['filename']] = $Content;
     }
     $this->numFiles = count($this->_Contents);
     return TRUE;
 }
All Usage Examples Of PclZip::listContent