mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
refactor command
This commit is contained in:
@@ -9,33 +9,36 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Command;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Command\Command as SymfoCommand;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Abstract command which represents a Phraseanet base command
|
||||||
*
|
*
|
||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
use Symfony\Component\Console\Command\Command;
|
abstract class Command extends SymfoCommand
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
|
||||||
|
|
||||||
abstract class module_console_PhraseanetCommand extends Command
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell whether the command requires Phraseanet to be set up to run
|
* Tell whether the command requires Phraseanet to be set-up or not
|
||||||
* @return boolean
|
*
|
||||||
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
abstract public function needPhraseaInstalled();
|
abstract public function requireSetup();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if Phraseanet is set up and if the current commands requires
|
* Check if Phraseanet is set-up and if the current command requires
|
||||||
* Phraseanet to be installed
|
* Phraseanet to be set-up
|
||||||
*
|
*
|
||||||
* @param \Symfony\Component\Console\Output\OutputInterface $output
|
* @param \Symfony\Component\Console\Output\OutputInterface $output
|
||||||
* @return boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
public function checkPhraseaInstall(OutputInterface $output)
|
public function checkSetup(OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ($this->needPhraseaInstalled()) {
|
if ($this->requireSetup()) {
|
||||||
$core = \bootstrap::getCore();
|
$core = \bootstrap::getCore();
|
||||||
|
|
||||||
if ( ! $core->getConfiguration()->isInstalled()) {
|
if ( ! $core->getConfiguration()->isInstalled()) {
|
||||||
@@ -47,5 +50,4 @@ abstract class module_console_PhraseanetCommand extends Command
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
@@ -17,8 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
|
|
||||||
class module_console_aboutAuthors extends module_console_PhraseanetCommand
|
class module_console_aboutAuthors extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -32,7 +33,7 @@ class module_console_aboutAuthors extends module_console_PhraseanetCommand
|
|||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ class module_console_aboutAuthors extends module_console_PhraseanetCommand
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -17,8 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
|
|
||||||
class module_console_aboutLicense extends module_console_PhraseanetCommand
|
class module_console_aboutLicense extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -32,7 +33,7 @@ class module_console_aboutLicense extends module_console_PhraseanetCommand
|
|||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ class module_console_aboutLicense extends module_console_PhraseanetCommand
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -18,8 +18,9 @@
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
|
|
||||||
class module_console_checkExtension extends module_console_PhraseanetCommand
|
class module_console_checkExtension extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -35,14 +36,14 @@ class module_console_checkExtension extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,8 +18,9 @@
|
|||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
|
|
||||||
class module_console_fieldsDelete extends module_console_PhraseanetCommand
|
class module_console_fieldsDelete extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -34,14 +35,14 @@ class module_console_fieldsDelete extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,8 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
|
|
||||||
class module_console_fieldsList extends module_console_PhraseanetCommand
|
class module_console_fieldsList extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -30,14 +31,14 @@ class module_console_fieldsList extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,8 +19,9 @@ use Symfony\Component\Console\Input\InputArgument;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
|
|
||||||
class module_console_fieldsMerge extends module_console_PhraseanetCommand
|
class module_console_fieldsMerge extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -44,14 +45,14 @@ class module_console_fieldsMerge extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,8 +18,9 @@
|
|||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
|
|
||||||
class module_console_fieldsRename extends module_console_PhraseanetCommand
|
class module_console_fieldsRename extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -35,14 +36,14 @@ class module_console_fieldsRename extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
@@ -21,7 +22,7 @@ use Alchemy\Phrasea\Core;
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
class module_console_fileEnsureDevSetting extends module_console_PhraseanetCommand
|
class module_console_fileEnsureDevSetting extends Command
|
||||||
{
|
{
|
||||||
const ALERT = 1;
|
const ALERT = 1;
|
||||||
const ERROR = 0;
|
const ERROR = 0;
|
||||||
@@ -54,14 +55,14 @@ class module_console_fileEnsureDevSetting extends module_console_PhraseanetComma
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Alchemy\Phrasea\Core;
|
use Alchemy\Phrasea\Core;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,7 +22,7 @@ use Alchemy\Phrasea\Core;
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
class module_console_fileEnsureProductionSetting extends module_console_PhraseanetCommand
|
class module_console_fileEnsureProductionSetting extends Command
|
||||||
{
|
{
|
||||||
const ALERT = 1;
|
const ALERT = 1;
|
||||||
const ERROR = 0;
|
const ERROR = 0;
|
||||||
@@ -54,14 +55,14 @@ class module_console_fileEnsureProductionSetting extends module_console_Phrasean
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,12 +15,14 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Monolog\Handler;
|
use Monolog\Handler;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_schedulerStart extends module_console_PhraseanetCommand
|
class module_console_schedulerStart extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -32,14 +34,14 @@ class module_console_schedulerStart extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,11 +15,12 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_schedulerState extends module_console_PhraseanetCommand
|
class module_console_schedulerState extends Command
|
||||||
{
|
{
|
||||||
const EXITCODE_SETUP_ERROR = 1;
|
const EXITCODE_SETUP_ERROR = 1;
|
||||||
const EXITCODE_STATE_UNKNOWN = 21;
|
const EXITCODE_STATE_UNKNOWN = 21;
|
||||||
@@ -48,14 +49,14 @@ class module_console_schedulerState extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return self::EXITCODE_SETUP_ERROR;
|
return self::EXITCODE_SETUP_ERROR;
|
||||||
}
|
}
|
||||||
|
@@ -15,10 +15,11 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_schedulerStop extends module_console_PhraseanetCommand
|
class module_console_schedulerStop extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -30,14 +31,14 @@ class module_console_schedulerStop extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -15,10 +15,11 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_sphinxGenerateSuggestion extends module_console_PhraseanetCommand
|
class module_console_sphinxGenerateSuggestion extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -31,14 +32,14 @@ class module_console_sphinxGenerateSuggestion extends module_console_PhraseanetC
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -15,10 +15,11 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_systemBackupDB extends module_console_PhraseanetCommand
|
class module_console_systemBackupDB extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -37,14 +38,14 @@ class module_console_systemBackupDB extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -14,12 +14,13 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Finder\Finder;
|
use Symfony\Component\Finder\Finder;
|
||||||
use Symfony\Component\Filesystem\Filesystem;
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_systemClearCache extends module_console_PhraseanetCommand
|
class module_console_systemClearCache extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -31,14 +32,14 @@ class module_console_systemClearCache extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -16,10 +16,11 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_systemConfigCheck extends module_console_PhraseanetCommand
|
class module_console_systemConfigCheck extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -31,14 +32,14 @@ class module_console_systemConfigCheck extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -15,11 +15,12 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_systemExport extends module_console_PhraseanetCommand
|
class module_console_systemExport extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -70,14 +71,14 @@ class module_console_systemExport extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -16,10 +16,11 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_systemMailCheck extends module_console_PhraseanetCommand
|
class module_console_systemMailCheck extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -36,14 +37,14 @@ class module_console_systemMailCheck extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -15,10 +15,11 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_systemTemplateGenerator extends module_console_PhraseanetCommand
|
class module_console_systemTemplateGenerator extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -30,14 +31,14 @@ class module_console_systemTemplateGenerator extends module_console_PhraseanetCo
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -16,10 +16,11 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_systemUpgrade extends module_console_PhraseanetCommand
|
class module_console_systemUpgrade extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -31,14 +32,14 @@ class module_console_systemUpgrade extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -15,12 +15,13 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_taskState extends module_console_PhraseanetCommand
|
class module_console_taskState extends Command
|
||||||
{
|
{
|
||||||
const EXITCODE_SETUP_ERROR = 1;
|
const EXITCODE_SETUP_ERROR = 1;
|
||||||
const EXITCODE_BAD_ARGUMENT = 2;
|
const EXITCODE_BAD_ARGUMENT = 2;
|
||||||
@@ -56,14 +57,14 @@ class module_console_taskState extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return self::EXITCODE_SETUP_ERROR;
|
return self::EXITCODE_SETUP_ERROR;
|
||||||
}
|
}
|
||||||
|
@@ -16,10 +16,11 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class module_console_tasklist extends module_console_PhraseanetCommand
|
class module_console_tasklist extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct($name = null)
|
public function __construct($name = null)
|
||||||
@@ -31,14 +32,14 @@ class module_console_tasklist extends module_console_PhraseanetCommand
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return self::EXITCODE_SETUP_ERROR;
|
return self::EXITCODE_SETUP_ERROR;
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Monolog\Handler;
|
use Monolog\Handler;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
@@ -22,7 +23,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
class module_console_taskrun extends module_console_PhraseanetCommand
|
class module_console_taskrun extends Command
|
||||||
{
|
{
|
||||||
private $task;
|
private $task;
|
||||||
private $shedulerPID;
|
private $shedulerPID;
|
||||||
@@ -64,14 +65,14 @@ class module_console_taskrun extends module_console_PhraseanetCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function needPhraseaInstalled()
|
public function requireSetup()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(InputInterface $input, OutputInterface $output)
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if ( ! $this->checkPhraseaInstall($output)) {
|
if ( ! $this->checkSetup($output)) {
|
||||||
|
|
||||||
return self::EXITCODE_SETUP_ERROR;
|
return self::EXITCODE_SETUP_ERROR;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user