In terms of HTTP input, PSR-7 does a fantastic job of providing a
standard interface to access input parameters.

As for console input, one of the benefits is that during the execution
of the console application it can ask for additional input. Asking a
user for a password, rather than using it as an input parameter in
plain sight (and console history!) is one obvious benefit of this
interactive input. Composer makes great use of this to ask for
required input that is not passed when initially invoked.

That being said, I think that Symfony's Console component is the
de-facto standard for console applications, including input and
output. I would be trilled to see someone create a PSR that abstracts
those interfaces to allow for more competition in the console space.
While symfony/console is easy to use, it is rather large and somewhat
awkward to use outside of Symfony, particularly when it comes to
dependency injection.
--
Woody Gilk
http://about.me/shadowhand


On Thu, Jan 11, 2018 at 4:20 AM, Alessandro Lai
<[email protected]> wrote:
> Time may not be important, but the fact that there is a challenge and
> response between the user and the application may change a lot the type of
> interaction. I hardly see a way to standardize this kind of stuff between a
> console and an HTTP part of an app.
>
> Il giorno giovedì 11 gennaio 2018 07:12:19 UTC+1, Majid abdolhosseini ha
> scritto:
>>
>> It depends on how you see things.
>> If you make abstraction, it's possible,
>>
>> just consider there is a software (application) which takes some inputs
>> and return output.
>> when developing application I don't care how I get inputs (console or web
>> or ...).
>>
>> I don't care additional inputs are given to process in the middle of
>> processing or at the beginning of process, the important thing is the
>> interface for cli commands, and time is not important when it comes to
>> programming into interface.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PHP Framework Interoperability Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/39f8fe32-5242-40e2-876c-65d3d03594ed%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAGOJM6Kdnp82nD3ciGsh5STz771QBkiJ1a%3DWd8u-oFEVZ5kS5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to