Symfony Framework Deepdive - Console
Symfony Framework Deepdive - Console
A deepdive into the Symfony console components
About the Book
Many PHP developers are great specialists and know their way around PHP like the back of their hand. However, when a powerful framework like Symfony is built, it also includes software patterns and designs, which even the most experienced developers need to learn. This book is aimed to teach you exactly that.
Console applications written in PHP are more and more common: utilities, data parsers, message queue workers, and even system daemons are written in PHP nowadays.
In this book we will talk in detail a couple of Symfony2 components that deal with console applications: the console, the process, the finder and the filesystem component. We talk about how they work internally, and how they can be utilized either from a stand-alone application or framework, or through your own Symfony2 framework application.
An absolute must for those writing console applications or console tasks, and those who want to understand the internals of the console in general.
About the Symfony Rainbow Series:The Symfony Rainbow Series is a collection of books, which describe, in detail, the different components that make up the Symfony framework. Every book will concentrate on a single component or a set of smaller components. The books will describe the component's inner workings and also give you recipes to solve common problems quickly and efficiently.
These books are intended for PHP developers with any level of knowledge of Symfony, from beginner to expert. They are especially made for those developers, who work with or want to work with Symfony and want to also do their programming with Symfony as smartly and efficiently as possible. If you would like to learn exactly how the inner workings of Symfony function together as a framework or how to use the wide range of Symfony components in a standalone fashion, then these books are for you!
Bundles that include this book
Table of Contents
-
Introduction
- About the Symfony rainbow series
-
Introduction
- Symfony versioning
- About those who will read this book
- About those I’d like to thank
-
The process component
- Introduction
-
Process communication
- Reading and writing files
- File descriptors
- Redirecting output
- Redirecting input
- Plumbing with pipes
- Terminals
-
The proc_open function
- Arguments
- Descriptor specifications
-
Directory structure
- Exceptions
- Process builder
-
Process classes
- PHP and enable-sigchild
- Process
- PhpProcess
-
Pipes
- PipesInterface
- AbstractPipes
- UnixPipes
- WindowsPipes
-
Process Finders
- ExecutableFinder
- PhpExecutableFinder
- ProcessUtils
-
The finder component
-
Introduction
- Instantiating
- Filtering and sorting
-
Directory structure
- Exceptions
-
The finder
- Generic functionality
- Target functionality
- Filter functionality
- Sort functionality
- Iterator functionality
- Adapter functionality
-
Adapters
- Changing the default adapter
- AdapterInterface
- AbstractAdapter
- PHPAdapter
- AbstractFindAdapter
- GnuFindAdapter
- BsdFindAdapter
-
Comparators
- DateComparator
- NumberComparator
-
Expressions
- ValueInterface
- Expression
- Glob
- Regex
-
Iterators
- CustomFilterIterator
- DateRangeFilterIterator
- DepthRangeFilterIterator
- MultiplePcreFilterIterator
- ExcludeDirectoryFilterIterator
- FileContentFilterIterator
- FilenameFilterIterator
- FileTypeFilterIterator
- FilterIterator
- PathFilterIterator
- RecursiveDirectoryIterator
- SizeRangeFilterIterator
- SortableIterator
-
Shell
- The Shell class
- The Command class
-
Introduction
-
The filesystem component
- Introduction
-
Directory structure
- Exceptions
- The FileSystem class
- The LockHandler class
-
The console component
- Introduction
- Directory structure
-
Command
- Command
- List Command
- Help Command
-
Descriptors
- Descriptor class
- Formatter classes
- ApplicationDescription class
-
Formatters
- OutputFormatterInterface
- OutputFormatter
- OutputFormatterStyleStack
- OutputFormatterStyle
-
Helpers
- InputAware(Interface)
- Helper
- HelperInterface
- HelperSet
- DescriptorHelper
- FormatterHelper
- ProcessHelper
- DebugFormatterHelper
- ProgressBar
- QuestionHelper
- SymfonyQuestionHelper
- Table
- Deprecated helpers
-
Input
- Arguments and Options
- InputInterface
- InputAwareInterface
- InputDefinition
- InputArgument
- InputOption
- Input
- ArrayInput
- ArgvInput
- StringInput
- Logger
-
Output
- Output class
- StreamOutput
- ConsoleOutput
- BufferedOutput
- NullOutput
- Question
-
Style
- StyleInterface
- OutputStyle
- SymfonyStyle
-
Application
- Your first application
- Registering commands
- Notable methods
- Shell
-
Commands within your Symfony2 application
- The app/console
- Further reading
Other books by this author
Authors have earned$9,893,579writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
C++ Best Practices
Jason TurnerLevel up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
Functional Design and Architecture
Alexander GraninSoftware Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
Atomic Kotlin
Bruce Eckel and Svetlana IsakovaFor both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
C++20
Rainer GrimmC++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
The book is almost daily updated. These incremental updates ease my interaction with the proofreaders.
Introductory Statistics with Randomization and Simulation
Mine Cetinkaya-Rundel, Christopher Barr, OpenIntro, and David DiezA complete foundation for Statistics, also serving as a foundation for Data Science, that introduces inference using randomization and simulation while covering traditional methods.
Leanpub revenue supports OpenIntro, so we can provide free desk copies to teachers interested in using our books in the classroom.
More resources: openintro.org.
Java OOP Done Right
Alan MellorObject Oriented Programming is still a great way to create clean, maintainable code. But only if you use it right.
This book gives you 25 years of OO best practice, ready to use.
You'll learn to design objects behaviour-first, use TDD to help, then confidently apply Design Patterns, SOLID principles and Refactoring to make clean, crafted code.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Composing Software
Eric ElliottAll software design is composition: the act of breaking complex problems down into smaller problems and composing those solutions. Most developers have a limited understanding of compositional techniques. It's time for that to change.
Cloud Strategy
Gregor Hohpe“Strategy is the difference between making a wish and making it come true.” A successful migration to the cloud shouldn’t be driven by wishes, but guided by a sound strategy, frameworks, and decision models. This book tells you how—without becoming superficial nor getting lost in technology and product details.
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #3
Cisco CCNA 200-301 Complet
4 Books
Ce lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301. - #4
CCDE Practical Studies (All labs)
3 Books
CCDE lab - #5
Modern Management Made Easy
3 Books
Read all three Modern Management Made Easy books. Learn to manage yourself, lead and serve others, and lead the organization. - #6
The Future of Digital Health
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy and how technology giants such as Amazon or Google want to conquer... - #7
Modern C++ by Nicolai Josuttis
2 Books
- #8
Django for Beginners/APIs/Professionals
3 Books
- #9
"The C++ Standard Library" and "Concurrency with Modern C++"
2 Books
Get my books "The C++ Standard Library" and "Concurrency with Modern C++" in a bundle. The first book gives you the details you should know about the C++ standard library; the second one dives deeper into concurrency with modern C++. In sum, you get more than 600 pages full of modern C++ and about 250 source files presenting the standard library... - #10
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité...