generate an controller

exmample:
run shipyard::controller <controller>
run shipyard::controller <controller> <parent_class>
run shipyard::controller <namespace>::<controller>

@param array 		$params
@return void
516678
public function action_controller( $params ) 
	{	
		$options = \CCDataObject::assign( $params );
		
		$name = $options->get( 0, null );
		$parent = $options->get( 1, null );
		
		// get name if we dont have one
		while( !$name ) 
		{
			$name = $this->read( 'Please enter the controller name: ' );
		}
		
		// fix controller suffix
		if ( substr( $name, ( strlen( 'Controller' ) * -1 ) ) != 'Controller' )
		{
			$name .= 'Controller';
		}
		
		// try to resolve the path
		if ( !$path = \CCPath::controllers( str_replace( '_', '/', $name ), EXT ) )
		{
			$this->error( 'Could not resolve the path. Check if the namespace is registered.' ); return;
		}
		
		// parent
		if ( is_null( $parent ) )
		{
			$parent = '\\CCController';
		} 
		
		// view controller
		if ( $options->get( 'view', false ) )
		{
			$parent = '\\CCViewController';
		}
		
		// create the class
		$class = \CCShipyard::create( 'class', $name, $parent );
		
		// get the actions
		$actions = array( 'index' );
		
		if ( $options->get( 'actions', false ) )
		{
			$actions = array_merge( $actions, explode( ',', $options->get( 'actions' ) ) );
		}
		
		foreach( $actions as $action )
		{
			$action = trim( $action );
			
			$class->add( 'function', 'action_'.$action, 'protected', 'echo "'.$name.' '.$action.' action";', ucfirst($action)." action\n@return void|CCResponse" );
			$class->add( 'line', 2 );
		}
		
		// add static init
		if ( !$options->get( 'no-events', false ) )
		{
			$class->add( 'function', 'wake', 'protected', '//', "Controller wake\n@return void|CCResponse" );
			$class->add( 'line', 2 );
			$class->add( 'function', 'sleep', 'protected', '//', "Controller wake\n@return void" );
		}
						
		// check for overwrite
		if ( file_exists( $path ) )
		{
			if ( !$this->confirm( "The class already exists. Do you wish to overwrite it?", true ) ) 
			{
				return;
			}
		}
		
		// write file
		\CCFile::write( $path, $class->output() );
	}
1193958
public function build(array $params = null) 
    {
        if(null !== $params) {
            $this->setParams($params);
        }
        
        $this->adapter = $this->getDoctrinePaginatorAdapter();
		$this->setCurrentPageNumber($this->getParam('page', 1));
		$this->setDefaultItemCountPerPage($this->getParam('limit', 30));
    }
1000684
public function run(): void
    {
        // dynamicly parse input params
        $args = func_get_args();
        
        if (count($args) < 1) {
            return;
        }
        
        // get event name
        $eventName = array_shift($args);
        // get event args as array if passed
        $eventArgs = @array_shift($args);

        // if event is registered
        if (isset($this->events[$eventName]) && Any::isArray($this->events[$eventName])) {
            foreach ($this->events[$eventName] as $callback) {
                // call anonymous function with args if passed
                call_user_func_array($callback, $eventArgs);
            }
        }
        
        // set to post runned actions
        $this->runned[$eventName] = $eventArgs;
    }
969952
public function action_install( $params ) {
		
		$path = $params[0];
		
		// get target directory
		$target_dir = \CCArr::get( 'target', $params, ORBITPATH );
		
		if ( empty( $path ) ) {
			CCCli::line( 'no ship path given.', 'red' ); return;
		}
		
		/*
		 * direct install if starting with /
		 */
		if ( substr( $path, 0, 1 ) == '/' ) {
			
			// fix path
			if ( substr( $path, -1 ) != '/' ) {
				$path .= '/';
			}
			
			// is directory
			if ( !is_dir( $path ) ) {
				CCCli::line( 'could not find a ship at path: '.$path, 'red' ); return;
			}
			
			// define the target
			$target = $target_dir.basename( $path ).'/';
			
			// check if we already have an directory with the same name
			if ( $target != $path && is_dir( $target ) ) {
				if ( !CCCli::confirm( "there is already a ship with this name. do you want to overwrite?", true ) ) {
					return;
				}
			}
			
			// are ya serius..
			if ( !CCCli::confirm( "are you sure you want to install this ship?", true ) ) {
				return;
			}
			
			// move the directory
			if ( $target != $path ) {
				rename( $path, $target );
			}

			// run the installer
			try {
				\CCOrbit::install( $target );
			}
			catch ( \Exception $e ) {
				CCCli::line( $e->getMessage(), 'red' ); 
				CCCli::line( 'ship installation failure.', 'red' ); return;
			}
			
			// we are done
			CCCli::line( 'ship installation succeeded', 'green' );
			
			return;
		}
		
		// check if the module is in our orbit path
		if ( is_dir( ORBITPATH.$path ) ) {
			
			// there is a ship yay
			CCCli::line( 'found ship at path: '.ORBITPATH.$path, 'green' );
			
			return static::action_install( array( ORBITPATH.$path, 'target' => \CCArr::get( 'target', $params ) ) );
		}
		
		// check if the module is in CCF dir
		if ( is_dir( CCROOT.$path ) ) {
			
			// there is a ship yay
			CCCli::line( 'found ship at path: '.CCROOT.$path, 'green' );
			
			return static::action_install( array( CCROOT.$path, 'target' => \CCArr::get( 'target', $params ) ) );
		}

		// search the repository for this ship
		CCCli::line( 'searching the repositories for: '.$path.' ...', 'cyan' );
	}
1272125
public function run()
    {
        // Creates the current controller instance
        $this->controller = new $this->controller($this->twig);

        // Calls the action method on the controller
        $response = call_user_func([$this->controller, $this->action]);

        // Shows the response
        echo $response;
    }
974462
public function action_help( $params ) {
		if ( method_exists( $this, 'help' ) ) 
		{
			 CCCli::line( $this->help_formatter( $this->help() ) ); return;
 		}
		CCCli::line( 'This console controller does not implement an help function or action.' , 'cyan' );
	}
785425
public function generateRouting(array $parameters)
    {
        if ($this->isSymfony4()) {
            return;
        }

        $relPath = '/Resources/config/';
        $sourceDir = $this->skeletonDir.$relPath;
        $targetDir = $this->bundle->getPath().$relPath;

        $this->renderSingleFile($sourceDir, $targetDir, 'routing.yml', $parameters, true);

        $this->assistant->writeLine('Generating routing : <info>OK</info>');
    }
191037
public function run()
    {
        $data       = $this->parseRequestUri();
        $controller = $data['controller'];
        $method     = $data['method'];
        $params     = $data['params'];

        $subModule  = $this->subModule;
        if ("" != $subModule) {
            $subModule = "\\" . $subModule;
        }

        $class      = sprintf("%s\\Controller%s\\%sController", $this->appNameSpace, $subModule, $controller);
        if (!(class_exists($class) && method_exists($class, $method))) {
            $this->fileNotFound();
        } else {
            $class  = new $class;
            $pipe = new Pipeline();
            $pipe->through($class->getMiddleWare())->then(function () use ($class, $method, $params) {
                call_user_func_array(array($class, $method), $params);
            });

            //call_user_func_array(array($class, $method), $params);
        }
    }
695448
public function run($params = null)
    {
        $this->parser = new Parser($this->paths);

        try {
            $argc = ($params === null) ? null : count($params);
            $this->result = $this->parser->parse($argc, $params);
        } catch (\Exception $e) {
            $this->parser->displayError($e->getMessage());
        }

        $this->parse();
    }
522123
public function run()
    {
        // choosing which controller action must be executed
        $sAction = $this->_chooseCurrentAction();

        // executing action which returns name of template to render
        /** @var Controller $oController */
        $oController = $this->getInstance("Controller");

        $view = $oController->getView();
        $view->sendHeaders();

        try {
            $oController->$sAction();
        } catch (SetupControllerExitException $exception) {
        } finally {
            $view->display();
        }
    }
140039
public static function run($hook, array $params = array())
    {
        // Make sure the hook index exists
        if (!isset(static::$plugins[$hook])) {
            return false;
        }

        // Run the hook
        foreach (static::$plugins[$hook] as $plugin) {
            call_user_func_array($plugin, $params);
        }
    }
1007470
public function handle(...$params): void
    {
        /* @var Server $server */
        $server = array_shift($params);
        /* @var int $fd */
        $fd = array_shift($params);
        /* @var Container $app */
        $app = $server->getApplication();

        $packData = $app->make('websocket.parser')->pack(
            $app->make('websocket.data_converter')->conversion($params)
        );

        if ($server->getServer()->isEstablished($fd)) {
            $server->getServer()->push($fd, $packData);

            return;
        }

        throw new OutOfBoundsException("The fd:[{$fd}] not websocket or websocket close");
    }
952215
public function action_create( $params )
	{
		$name = array_shift( $params );
		
		$file = \DB\Migrator::path( $name );
		
		\CCFile::write( $file, "# ---> up\n\n\n\n# ---> down\n\n" );
	}
911925
public function generateScripts(array $params = null)
    {
        $cball = <<<CBALL
(function(window,$){ 
            $('body').on('click', '#%s', function () {
                $('div.test-results').remove();
                var form=$(this).parents('form:first');                
                $.ajax({
                    url:"%s",
                    data:form.serialize(),
                    type:"POST",
                    beforeSend:function(){                        
                        form.find('input,button,select,textarea').addClass('btn-disabled').attr('disabled','disabled');
                    },
                    success:function(response){
                        $('<div/>').attr('class','test-results').html(response).insertAfter(form);
                        form.find('input,button,select,textarea').removeClass('btn-disabled').removeAttr('disabled');
                    },
                    error:function(response){
                        form.find('input,button,select,textarea').removeClass('btn-disabled').removeAttr('disabled');
                    }
                });
                return false;
            });      
   })(window,jQuery);

CBALL;

        $inlineScript = sprintf($cball, $params['id'], handles('antares::tools/tester/run', ['csrf' => true]));
        app('antares.asset')
                ->container(app('config')->get('antares/tester::container'))
                ->inlineScript($params['id'], $inlineScript);
    }
464215
public function bench_compilers(array $params): void
    {
        /** @var Compiler $compiler */
        $compiler = $this->compilers[$params["compiler"]];

        new Router($this->routes, $compiler);
    }
812546
public function run() {

		$registryKey = $this->generateRegistryItemKey();

		if (!count($this->filteredBy) && !$this->jsonStorage->getLength($this->registry)) {
			return;
		}

		echo "<tr>\n";
		$cols = count($this->grid->columns);
		echo "<td colspan='{$cols}'>\n";
		echo "<div id='{$this->getId()}'>\n";
		if (count($this->filteredBy)) {
			echo '<p><span class="label label-success">Filtered by</span> ' . $this->displayExtendedFilterValues(
				$this->filteredBy
			) . '</p>';
		}

		$this->displaySaveButton($registryKey);
		$this->displaySavedFilters($registryKey);

		echo "</div>\n";
		echo "</td>\n";
		echo "</tr>\n";
	}
506336
public function runApplication()
    {
        $application = $this->createNew(SymfonyApplication::class, $this->getName());
        foreach ($this->commands as $commandClass) {
            $command = $this->createNew($commandClass);
            $application->add($command);
            if ($command instanceof Command && $command->isDefaultCommand()) {            
                $application->setDefaultCommand($command->getName());
            }
        }        
        $application->run();
    }