function route($f3,$params) {
        if (PHP_SAPI!='cli' && !$this->web)
            $f3->error(404);
        $exec=isset($params['job'])?
            array($params['job']=>$this->execute($params['job'],FALSE)):
            $this->run();
        if (!$this->silent) {
            if (PHP_SAPI!='cli')
                header('Content-Type: text/plain');
            if (!$exec)
                die('Nothing to do');
            foreach($exec as $job=>$ok)
                echo sprintf('%s [%s]',$job,$ok?'OK':'async')."\r\n";
        }
    }
function route($f3,$params) {
        if (PHP_SAPI!='cli' && !$this->web)
            $f3->error(404);
        $exec=isset($params['job'])?
            array($params['job']=>$this->execute($params['job'],FALSE)):
            $this->run();
        if (!$this->silent) {
            if (PHP_SAPI!='cli')
                header('Content-Type: text/plain');
            if (!$exec)
                die('Nothing to do');
            foreach($exec as $job=>$ok)
                echo sprintf('%s [%s]',$job,$ok?'OK':'async')."\r\n";
        }
    }
function route ( $ f3 , $ params ) { if ( PHP_SAPI != 'cli' && ! $ this -> web ) $ f3 -> error ( 404 ) ; $ exec = isset ( $ params [ 'job' ] ) ? array ( $ params [ 'job' ] => $ this -> execute ( $ params [ 'job' ] , FALSE ) ) : $ this -> run ( ) ; if ( ! $ this -> silent ) { if ( PHP_SAPI != 'cli' ) header ( 'Content-Type: text/plain' ) ; if ( ! $ exec ) die ( 'Nothing to do' ) ; foreach ( $ exec as $ job => $ ok ) echo sprintf ( '%s [%s]' , $ job , $ ok ? 'OK' : 'async' ) . "\r\n" ; } }
Route controller code
@param \Base $f3
@param array $params
Route controller code