Ejemplo n.º 1
0
 public static function buildCatalog()
 {
     self::$catalog = array();
     self::$packageList = array();
     $configureFiles = self::listConfigureFiles();
     $installedPackages = array();
     foreach ($configureFiles as $class => $filepath) {
         $metadata = get_class_vars($class);
         $metadata['configure_class'] = $class;
         Package_Catalog_Standardize::packageData($metadata, $filepath);
         Package_Catalog_Standardize::navigation($metadata);
         Package_Catalog_Standardize::typeRestrictions($metadata);
         Package_Catalog_Datastore::import($metadata);
         //Package_Message::log('debug', 'Catalog added ' .str_replace(DOCROOT, '', $filepath) .' as ' .$metadata['packageName'] .' version ' .$metadata['version'] . ' identified by ' .$metadata['identifier']);
         self::$catalog[$metadata['identifier']] = $metadata;
         self::$packageList[$metadata['packageName']][$metadata['status']][$metadata['identifier']] =& self::$catalog[$metadata['identifier']];
     }
     if (self::$remote) {
         $remoteCatalog = Package_Catalog_Remote::queryRepositories();
         foreach ($remoteCatalog as $identifier => $metadata) {
             if (!empty(self::$catalog[$identifier])) {
                 continue;
             }
             self::$catalog[$identifier] = $metadata;
             self::$packageList[$metadata['packageName']][Package_Manager::STATUS_UNINSTALLED][$identifier] =& self::$catalog[$identifier];
         }
     }
     self::findAvaliableMigrations();
     return self::$catalog;
 }
Ejemplo n.º 2
0
    public function finalize($identifier)
    {
        $package = &Package_Catalog::getPackageByIdentifier($identifier);
        
        $package['status'] = Package_Manager::STATUS_INSTALLED;

        Package_Catalog_Datastore::export($package);
    }
Ejemplo n.º 3
0
 public function finalize($identifier)
 {
     $package =& Package_Catalog::getPackageByIdentifier($identifier);
     $package['status'] = Package_Manager::STATUS_INSTALLED;
     Package_Catalog_Datastore::export($package);
     Package_Catalog::buildCatalog();
     $configureInstance = Package_Catalog::getPackageConfigureInstance($identifier);
     $configureInstance->finalizeInstall($identifier);
 }
Ejemplo n.º 4
0
 public function finalize($identifier)
 {
     $package =& Package_Catalog::getPackageByIdentifier($identifier);
     unset($package['datastore_id']);
     Package_Catalog_Datastore::export($package);
 }
Ejemplo n.º 5
0
 public function finalize($identifier)
 {
     $metadata =& Package_Catalog::getPackageByIdentifier($identifier);
     Package_Catalog_Datastore::remove($metadata);
 }