Example #1
0
 /**
  * main -- main logic flow.
  * script checks for defined tables and then exports data and schema as demanded
  *
  * @return void
  */
 public function main()
 {
     global $argv;
     $file = $this->getArgument('FILE');
     $paramdir = $this->getArgument('DIRECTORY');
     $dir = $paramdir ? $paramdir : BASEDIR;
     if ($file) {
         $book = new ebook($file);
         $book->file = $book->cleanupFile($file, $dir);
         $lib = new library();
         $lib->insertBook($book);
     } else {
         echo "No ebook given.\n";
     }
 }