Arquivos
wMind/mind3rd/API/programs/Commit.php
T
Felipe Nascimento de Moura aa8e451a58 - Refactor of all the MindCommand class
- Rebuilt of all programs to use the pattern of the new format designed for the new MindCommand class
2011-04-15 23:32:55 -03:00

43 linhas
1.1 KiB
PHP
Arquivo Executável

<?php
use Symfony\Component\Console\Input\InputArgument,
Symfony\Component\Console\Input\InputOption,
Symfony\Component\Console;
/**
* This class represents the program auth, receiving the user and
* may also receive the password. It will start your session
* allowing you to run the restricted programs
*
* @author Felipe Nascimento de Moura <felipenmoura@gmail.com>
*/
class Commit extends MindCommand implements program
{
private $nameSpace= false;
public $autoCommit= false;
public function __construct()
{
$this->setCommandName('commit')
->setDescription('Commits the analyzed content to a new version')
->setRestrict(true)
->setAction('action')
->setHelp(<<<EOT
This command will increase the current version and also will persist the currently analyzed structure into the system's knowledge base.
EOT
);
$this->init();
}
public function action()
{
if(!isset($_SESSION['currentProject']))
{
Mind::write('currentProjectRequired');
Mind::write('currentProjectRequiredTip');
return false;
}
MindProject::analyze(true, false);
return $this;
}
}