コード例 #1
0
 /**
  * Get controllers
  *
  * @param DbSync_Console $console
  * @return array
  */
 public function getControllers(DbSync_Console $console)
 {
     $controller = $console->getArgument(0);
     if (isset($this->_controllers[$controller])) {
         $controllers = $controller;
         //remove controller from arguments
         $args = $console->getArguments();
         unset($args['0']);
         $console->setArguments($args);
     } else {
         $controllers = array_keys($this->_controllers);
     }
     return (array) $controllers;
 }
コード例 #2
0
ファイル: index.php プロジェクト: simha95/php-dbsync
<?php

/**
 * DbSync
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://code.google.com/p/php-dbsync/wiki/License
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to maks.slesarenko@gmail.com so we can send you a copy immediately.
 *
 * @license  http://code.google.com/p/php-dbsync/wiki/License   New BSD License
 * @version  $Id$
 */
defined('APPLICATION_PATH') || define('APPLICATION_PATH', dirname(__FILE__));
defined('REAL_PATH') || define('REAL_PATH', realpath('.'));
require_once APPLICATION_PATH . '/init.php';
$console = new DbSync_Console();
$front = new DbSync_Controller_FrontController();
$front->dispatch($console->parse());
__halt_compiler();
コード例 #3
0
 /**
  * Colorize
  *
  * @param string $text
  * @param string $color
  * @return string
  */
 public function colorize($text, $color = 'yellow')
 {
     return $this->_console->colorize($text, $color);
 }