/library/MTool/Command/Current.php
PHP | 28 lines | 16 code | 3 blank | 9 comment | 3 complexity | b8ce7ceec4a32e426388da45b69ea2fe MD5 | raw file
- <?php
- /**
- * @package MTool_Command
- * @author Dmitriy Britan <dmitriy.britan@nixsolutions.com>
- */
- class MTool_Command_Current extends MTool_Command_Abstract
- {
- const HELP_TITLE = 'current';
- const HELP_SHORT = 'Show current migration';
- const HELP_DESCRIPTION = '';
-
- /**
- * Main method, implements command 'current'
- *
- * @param array $params
- */
- protected function _exec()
- {
- $current = $this->getCurrentMigration();
- if ($current != '0') {
- $this->addMessage('Current migration: ' . $current);
- } else {
- $this->addMessage('Current migration: none');
- }
- }
- }