コード例 #1
0
 public function __prepareIndex()
 {
     header('content-type: text/plain');
     $this->_fields = @$_REQUEST['fields'];
     $importManager = new ImportManager($this->_Parent);
     $this->_importers = $importManager->listAll();
     // Import now?
     foreach ($this->_importers as $importer) {
         $importer = (object) $importer;
         if (isset($_GET[$importer->handle])) {
             $this->_fields['importer'] = $importer->handle;
             $this->_fields['source'] = $_GET[$importer->handle];
             $this->_importer = $importManager->create($this->_fields['importer']);
             $this->__actionIndex();
             return;
         }
     }
     if ($this->_fields['importer']) {
         $this->_importer = $importManager->create($this->_fields['importer']);
     }
 }
コード例 #2
0
 public function __prepareIndex()
 {
     $manager = new ImportManager();
     $this->_importers = $manager->listAll();
 }