public function getPackages()
    {
        if(empty($this->packages)) {
            
            $xml = $this->getXmlContent();
            foreach($xml->packages->package as $package)
            {
                $data = (array)$package;
                extract($data['@attributes']);
                // checksums may not exist on some remote packages
                if(!isset($checksum)) {
                    $checksum = null;
                }                
                $this->packages[] = new Package($id, $checksum, $name, $subdir, $unzip, $url);
            }            
        }
        return $this->packages;
                
    }
public function getPackages()
    {
        if(empty($this->packages)) {
            
            $xml = $this->getXmlContent();
            foreach($xml->packages->package as $package)
            {
                $data = (array)$package;
                extract($data['@attributes']);
                // checksums may not exist on some remote packages
                if(!isset($checksum)) {
                    $checksum = null;
                }                
                $this->packages[] = new Package($id, $checksum, $name, $subdir, $unzip, $url);
            }            
        }
        return $this->packages;
                
    }
public function getPackages ( ) { if ( empty ( $ this -> packages ) ) { $ xml = $ this -> getXmlContent ( ) ; foreach ( $ xml -> packages -> package as $ package ) { $ data = ( array ) $ package ; extract ( $ data [ '@attributes' ] ) ; // checksums may not exist on some remote packages if ( ! isset ( $ checksum ) ) { $ checksum = null ; } $ this -> packages [ ] = new Package ( $ id , $ checksum , $ name , $ subdir , $ unzip , $ url ) ; } } return $ this -> packages ; }
Returns an array of packages available for download from the nltk project
@return array
Returns an array of packages available for download from the nltk project