Hello,

 

I'm working on a console app, but I'm getting lost in several things.

 

I have gotten the app to run in both the browser and the console. 

 

However, in the console it returns this :

 

[snip]

# php public_html/index.php

==------------------------------------------------------==

        ZF2 Console TestApp

==------------------------------------------------------==

 

Usage: n.a.

 

Reason for failure: Invalid arguments or no arguments provided

[/snip]

 

I would like to turn off the reason notice.

 

I found the function RouteNotFoundStrategy but everything I'm trying isn't
working.

 

I'm assuming I would want to set this in the getConsoleUsage function as it
is default ran when no route is provided in console mode.

 

I add in this 

 

[code]

 

public function getConsoleUsage(Console $console){   

      

      RouteNotFoundStrategy\setDisplayNotFoundReason(false);

      

      return array (

            "Usage: na"       

      );

}

 

[/code]

 

Zend Studio adds the following above the class line

 

[code]

 

use Zend\Mvc\View\Console\RouteNotFoundStrategy;

 

[/code]

 

I don't get anything in code complete options and studio say "Call to
undefined function 'setDisplayNotFoundReason'"

 

I figure I am calling the function incorrectly, can someone refresh my
memory. 

 

I've tried several ways, but I just can't seem to get it to work.

 

HELP! PLEASE!

 

If I missed this in the documentation, please tell me where it is . 

 

Terre

Reply via email to