Index
A
- abstract classes
- about / Abstract classes
- acceptance tests
- about / Types of tests
- versus unit tests / Unit tests versus acceptance tests
- aliases
- URL / Managing dependencies
- anonymous functions
- about / Anonymous functions
- Apache
- reference / The PHP built-in server
- API
- about / Introducing APIs
- APIs
- testing, with browsers / Testing APIs with browsers
- testing, with command line / Testing APIs using the command line
- arguments by value
- versus arguments by reference / Function arguments
- arithmetic operators
- about / Arithmetic operators
- array functions
- about / Other array functions
- arrays
- about / Arrays
- initializing / Initializing arrays
- populating / Populating arrays
- accessing / Accessing arrays
- isset function / The empty and isset functions
- empty function / The empty and isset functions
- elements, searching in / Searching for elements in an array
- ordering / Ordering arrays
- assertions
- about / Assertions
- reference / Assertions
- assignment operators
- about / Assignment operators
- authentication
- about / REST API security
- authorization
- about / REST API security
- autoloader
- about / Autoloading classes
- autoloading
- about / Autoloading classes
B
- BDD
- versus TDD / TDD versus BDD
- BDD, with Behat
- about / BDD with Behat
- Behat
- about / BDD with Behat
- behavior-driven development
- about / Behavior-driven development
- behavioral specifications
- about / Business writing tests
- best practices, REST APIs
- about / Best practices with REST APIs
- consistency, in endpoints / Consistency in your endpoints
- documenting / Document as much as you can
- filters / Filters and pagination
- pagination / Filters and pagination
- API versioning / API versioning
- HTTP cache, using / Using HTTP cache
- browsers
- APIs, testing with / Testing APIs with browsers
- business writing tests
- about / Business writing tests
C
- cache layer
- about / Cache
- callable
- about / Anonymous functions
- casting
- about / Getting information from the user
- versus type juggling / Getting information from the user
- C for controller
- defining / C for controller
- error controller / The error controller
- login controller / The login controller
- book controller / The book controller
- books, borrowing / Borrowing books
- sales controller / The sales controller
- class
- about / Classes and objects
- class constructors
- about / Class constructors
- classes
- conventions / Properties and methods visibility
- autoloading / Autoloading classes
- class methods
- about / Class methods
- class properties
- about / Class properties
- code coverage
- about / Unit tests and code coverage
- command line
- APIs, testing with / Testing APIs using the command line
- comparison operators
- about / Comparison operators
- components, frameworks
- router / The main parts of a framework
- request / The main parts of a framework
- configuration handler / The main parts of a framework
- template engine / The main parts of a framework
- logger / The main parts of a framework
- dependency injector / The main parts of a framework
- Composer
- reference / Installing Composer
- using / Using Composer
- dependencies, managing / Managing dependencies
- autoloader, with PSR-4 / Autoloader with PSR-4
- metadata, adding / Adding metadata
- index.php file / The index.php file
- conditionals
- about / Control structures, Conditionals
- constraints
- about / Keys and constraints
- continuous integration (CI)
- controllers
- about / The MVC pattern
- control structures
- about / Control structures
- conditionals / Conditionals
- switch…case / Switch…case
- loops / Loops
- cookies
- data, persisting with / Persisting data with cookies
- CSS
- about / HTML, CSS, and JavaScript
- cURL
- about / Setting up the application
D
- data
- persisting, with cookies / Persisting data with cookies
- inserting / Inserting data
- querying / Querying data
- updating / Updating and deleting data, Updating data
- deleting / Deleting data
- databases
- versus files / Writing files
- about / Introducing databases
- MySQL / MySQL
- databases, data types
- about / Database data types
- numeric data types / Numeric data types
- string data types / String data types
- list of values / List of values
- date and time data types / Date and time data types
- database testing
- about / Database testing
- data providers
- about / Data providers
- data providing
- about / Data providers
- Data Source Name (DSN) / Connecting to the database
- data types
- about / Data types
- Booleans / Data types
- integers / Data types
- floats / Data types
- strings / Data types
- reference / Database data types
- date and time data types
- about / Date and time data types
- reference link / Date and time data types
- decrementing operators
- DELETE method / DELETE
- dependency injection
- defining / Dependency injection
- about / Dependency injection
- need for / Why is dependency injection necessary?
- dependency injector
- implementing / Implementing our own dependency injector
- design patterns
- about / Design patterns
- factory / Factory
- singleton / Singleton
- DesignPatternsPHP
- reference / Design patterns
- DI
- models, injecting with / Injecting models with DI
- doubles
- testing with / Testing with doubles
- do…while loop / Do…while
E
- elements
- searching, in array / Searching for elements in an array
- Eloquent JavaScript
- reference / HTML, CSS, and JavaScript
- empty function
- about / The empty and isset functions
- encapsulation
- about / Encapsulation
- environment
- setting up, with Vagrant / Setting up the environment with Vagrant
- environment setup, on OS X
- about / Setting up the environment on OS X
- PHP, installing / Installing PHP
- MySQL, installing / Installing MySQL
- Nginx, installing / Installing Nginx
- Composer, installing / Installing Composer
- environment setup, on Ubuntu
- about / Setting up the environment on Ubuntu
- PHP, installing / Installing PHP
- MySQL, installing / Installing MySQL
- Nginx, installing / Installing Nginx
- environment setup, on Windows
- about / Setting up the environment on Windows
- PHP, installing / Installing PHP
- MySQL, installing / Installing MySQL
- Nginx, installing / Installing Nginx
- Composer, installing / Installing Composer
- escape characters
- about / Working with strings
- exception handling
- try catch block / The try…catch block
- finally block / The finally block
- exceptions
- handling / Handling exceptions
- catching / Catching different types of exceptions
- exit condition / For
- expecting exceptions
- about / Expecting exceptions
- expression
- about / Operators
F
- factory design pattern
- about / Factory
- feature
- about / Introducing the Gherkin language
- features, frameworks
- about / Other features of frameworks
- authentication / Authentication and roles
- roles / Authentication and roles
- Object-relational mapping (ORM) / ORM
- cache / Cache
- internationalization / Internationalization
- feature tests
- running / Running feature tests
- fetch mode
- advantages / The book model
- disadvantages / The book model
- fields
- about / Schemas and tables
- fields, table
- NOT NULL / Managing tables
- UNSIGNED / Managing tables
- DEFAULT <value> / Managing tables
- files
- reading / Reading files
- writing / Writing files
- versus databases / Writing files
- filesystem
- about / The filesystem
- filesystem functions
- about / Other filesystem functions
- finally block
- about / The finally block
- foreach loop / Foreach
- foreign key behaviors / Foreign key behaviors
- foreign keys
- about / Foreign keys
- for loop / For
- foundations, REST APIs
- HTTP request methods / HTTP request methods
- status codes, in responses / Status codes in responses
- REST API security / REST API security
- framework, types
- about / Types of frameworks
- complete / Complete and robust frameworks
- robust / Complete and robust frameworks
- lightweight / Lightweight and flexible frameworks
- flexible / Lightweight and flexible frameworks
- frameworks
- reviewing / Reviewing frameworks
- purpose / The purpose of frameworks
- parts / The main parts of a framework
- components / The main parts of a framework
- features / Other features of frameworks
- overview / An overview of famous frameworks
- Symfony 2 / Symfony 2
- Zend Framework 2 / Zend Framework 2
- function arguments / Function arguments
- functions
- about / Functions
- declaring / Function declaration
- functions, arrays
- reference / Ordering arrays, Other array functions
- functions, date and time data types
- DAY() / Date and time data types
- MONTH() / Date and time data types
- YEAR() / Date and time data types
- HOUR() / Date and time data types
- MINUTE() / Date and time data types
- SECOND() / Date and time data types
- CURRENT_DATE() / Date and time data types
- CURRENT_TIME() / Date and time data types
- NOW() / Date and time data types
- DATE_FORMAT() / Date and time data types
- DATE_ADD() / Date and time data types
- functions, PDO
- beginTransaction / Working with transactions
- commit / Working with transactions
- rollBack / Working with transactions
- functions, PHP files
- functions, strings
- reference / Working with strings
- strlen / Working with strings
- trim / Working with strings
- strtolower / Working with strings
- strtoupper / Working with strings
- str_replace / Working with strings
- substr / Working with strings
- strpos / Working with strings
G
- GET method / GET
- getter
- about / Encapsulation
- Gherkin
- about / Introducing the Gherkin language
- Given-When-Then test cases
- writing / Writing Given-When-Then test cases
- Goutte
- Mink, installing with / Installing Mink with Goutte
- Graphical User Interface (GUI)
- about / MySQL
- Guzzle
- about / Setting up the application
H
- HTML
- about / HTML, CSS, and JavaScript
- HTML forms
- about / HTML forms
- HTTP
- about / The HTTP protocol
- HTTP message, parts
- about / Parts of the message
- URI / URL
- HTTP method / The HTTP method
- body / Body
- headers / Headers
- status code / The status code
- HTTP method
- about / The HTTP method
- GET / The HTTP method
- POST / The HTTP method
- PUT / The HTTP method
- DELETE / The HTTP method
- OPTION / The HTTP method
- HTTP protocol
- about / The HTTP protocol
- interchange of messages, example / A simple example
- complex example / A more complex example
- HTTP request methods
- about / HTTP request methods
- GET / GET
- POST / POST and PUT
- PUT / POST and PUT
- DELETE / DELETE
I
- 500 internal server error / 5xx – server error
- Illuminate\Database\Eloquent\Model / Project setup
- impersonification
- about / Authentication and roles
- incrementing operators
- indexes
- about / Indexes
- infinite loops / While
- information hiding
- about / Encapsulation
- inheritance
- about / Inheritance, Introducing inheritance
- methods, overriding / Overriding methods
- abstract classes / Abstract classes
- installing
- Vagrant / Installing Vagrant
- Mink, with Goutte / Installing Mink with Goutte
- integration tests
- about / Types of tests
- interface
- about / Interfaces
- internationalization
- about / Internationalization
- isset function
- about / The empty and isset functions
J
- JavaScript
- about / HTML, CSS, and JavaScript
- join queries
- about / Joining tables
K
- keys
- about / Keys and constraints
- primary keys / Primary keys
- foreign keys / Foreign keys
- unique keys / Unique keys
L
- lambda functions
- about / Anonymous functions
- Laravel
- versus Silex / Silex versus Laravel
- Laravel framework
- about / The Laravel framework
- installation / Installation
- project setup / Project setup
- first endpoint, adding / Adding the first endpoint
- users, managing / Managing users
- relationships, setting up in models / Setting up relationships in models
- complex controllers, creating / Creating complex controllers
- tests, adding / Adding tests
- layout
- about / Layouts and blocks
- lazy load
- about / The sales model
- left joins
- about / Joining tables
- list of values
- about / List of values
- lists
- about / Arrays
- logical operators
- about / Logical operators
- loops
M
- magic methods
- about / Magic methods
- __toString / Magic methods
- __call / Magic methods
- __get / Magic methods
- maps
- about / Arrays
- methods
- overriding / Overriding methods
- methods visibility
- M for model
- defining / M for model
- customer model / The customer model
- book model / The book model
- sales model / The sales model
- Mink
- used, for testing with browser / Testing with a browser using Mink
- installing, with Goutte / Installing Mink with Goutte
- browser interaction / Interaction with the browser
- mocks
- using / Using mocks
- models
- about / The MVC pattern
- injecting, with DI / Injecting models with DI
- Monolog
- about / Adding a logger
- reference / Adding a logger
- MVC pattern
- defining / The MVC pattern
- MySQL
- about / MySQL
- MySQL engines
- reference / Managing tables
- MySQL server installer
- reference / Installing MySQL, Installing MySQL
- MySQL Workbench
- reference / Installing MySQL
N
- namespaces
- about / Namespaces
- Nginx
- reference / The PHP built-in server
- numeric data types
- about / Numeric data types
O
- OAuth2 authentication
- database, setting up / Setting up the database
- client-credentials authentication, enabling / Enabling client-credentials authentication
- access token, requesting / Requesting an access token
- OAuth 2.0
- about / OAuth 2.0
- OAuth2Server
- installing / Installing OAuth2Server
- Object-relational mapping (ORM)
- about / ORM
- objects
- about / Classes and objects
- operator precedence
- about / Operator precedence
- operators
- about / Operators
- arithmetic operators / Arithmetic operators
- assignment operators / Assignment operators
- comparison operators / Comparison operators
- logical operators / Logical operators
- decrementing operators / Incrementing and decrementing operators
- incrementing operators / Incrementing and decrementing operators
- optional arguments / Function arguments
- overindexing
- about / Indexes
- overloaded functions / Function declaration
P
- Packagist
- about / Adding metadata, Setting up the application
- references / Adding metadata
- PDO
- using / Using PDO
- connecting, to database / Connecting to the database
- queries, performing / Performing queries
- prepared statements / Prepared statements
- PHP
- reference / Autoloader with PSR-4
- PHP, and HTML
- mixing / Conditionals
- PHP, in web applications
- about / PHP in web applications
- information, obtaining from user / Getting information from the user
- HTML forms / HTML forms
- data, persisting with cookies / Persisting data with cookies
- PHP built-in server
- about / The PHP built-in server
- PHP files
- PHP functions, filesystem
- file_exists / Other filesystem functions
- is_writable / Other filesystem functions
- reference / Other filesystem functions
- PHP installer
- reference / Installing PHP
- PHPUnit
- about / Integrating PHPUnit
- integrating / Integrating PHPUnit
- phpunit.xml file
- about / The phpunit.xml file
- Pimple
- about / Project setup
- polymorphism
- about / Polymorphism
- POST method / POST and PUT
- prepared statements / Prepared statements
- primary keys
- about / Primary keys
- production web servers
- about / The PHP built-in server
- project setup, Silex microframework
- about / Project setup
- configuration, managing / Managing configuration
- template engine, setting / Setting the template engine
- logger, adding / Adding a logger
- properties visibility
- PUT method / POST and PUT
Q
- queries
- grouping / Grouping queries
R
- receiver
- about / A simple example
- reflection
- about / Database testing
- reference / Database testing
- requests
- working with / Working with requests
- request object / The request object
- parameters, filtering from / Filtering parameters from requests
- routes, mapping to controllers / Mapping routes to controllers
- router / The router
- REST API, creating with Laravel
- about / Creating a REST API with Laravel
- OAuth2 authentication, setting / Setting OAuth2 authentication
- database, preparing / Preparing the database
- models, setting up / Setting up the models
- endpoints, designing / Designing endpoints
- controllers, adding / Adding the controllers
- REST API developer
- toolkit / The toolkit of the REST API developer
- REST APIs
- about / Introducing REST APIs
- foundations / The foundations of REST APIs
- best practices / Best practices with REST APIs
- testing / Testing your REST APIs
- REST API security
- about / REST API security
- basic access authentication / Basic access authentication
- OAuth 2.0 / OAuth 2.0
- return statement / The return statement
- return type / Type hinting and return types
- RFC2068 standard
- reference / The HTTP protocol
- router
- about / The router
- URLs matching, with regular expressions / URLs matching with regular expressions
- arguments, extracting of URL / Extracting the arguments of the URL
- controller, executing / Executing the controller
S
- scenarios
- defining / Defining scenarios
- Given-When-Then test cases, writing / Writing Given-When-Then test cases
- parts, reusing of / Reusing parts of scenarios
- schemas
- about / Schemas and tables, Understanding schemas
- sender
- about / A simple example
- setter
- about / Encapsulation
- Silex
- versus Laravel / Silex versus Laravel
- reference / Silex versus Laravel
- Silex microframework
- about / The Silex microframework
- installation / Installation
- project setup / Project setup
- first endpoint, adding / Adding the first endpoint
- database, accessing / Accessing the database
- singleton design pattern
- about / Singleton
- spl_autoload_register function
- standards, PHP
- PSR-0 / Autoloader with PSR-4
- PSR-4 / Autoloader with PSR-4
- static methods
- about / Static properties and methods
- static properties
- about / Static properties and methods
- status codes
- 200 / The status code
- 401 / The status code
- 404 / The status code
- 500 / The status code
- reference / Status codes in responses
- status codes, in responses
- about / Status codes in responses
- 2xx - success / 2xx – success
- 3xx - redirection / 3xx – redirection
- 4xx - client error / 4xx – client error
- 5xx - server error / 5xx – server error
- step definitions
- writing / Writing step definitions
- steps
- parameterization / The parameterization of steps
- string data types
- about / String data types
- strings
- working with / Working with strings
- superglobals
- about / Other superglobals
- reference / Other superglobals
- switch…case
- about / Switch…case
- Symfony
- about / Installing Mink with Goutte
- Symfony 2
- about / Symfony 2
T
- tables
- about / Schemas and tables
- managing / Managing tables
- joining / Joining tables
- TDD
- versus BDD / TDD versus BDD
- test-driven development (TDD)
- about / Test-driven development
- theory, versus practice / Theory versus practice
- TestCase
- customizing / Customizing TestCase
- tests
- need for / The necessity for tests
- types / Types of tests
- unit tests / Types of tests
- integration tests / Types of tests
- acceptance tests / Types of tests
- about / Your first test
- running / Running tests
- tests, features
- automatic / Types of tests
- extensive / Types of tests
- immediate / Types of tests
- open / Types of tests
- useful / Types of tests
- third-party APIs
- using / Using third-party APIs
- application's credentials, obtaining / Getting the application's credentials
- application, setting up / Setting up the application
- access token, requesting / Requesting an access token
- tweets, fetching / Fetching tweets
- timestamps / Persisting data with cookies
- tools installation, with Composer
- reference / Integrating PHPUnit
- traits
- about / Traits
- transactions
- working with / Working with transactions
- try
catch block
- about / The try…catch block
- Twig
- about / Introduction to Twig
- Twitter
- reference / Getting the application's credentials
- type hinting / Type hinting and return types
- type juggling / Data types
- versus casting / Getting information from the user
U
- unique keys
- about / Unique keys
- unit tests
- about / Types of tests, Unit tests and code coverage
- writing / Writing unit tests
- start / The start and end of a test
- end / The start and end of a test
- versus acceptance tests / Unit tests versus acceptance tests
- user management, Laravel framework
- about / Managing users
- user registration / User registration
- user login / User login
- protected routes / Protected routes
V
- Vagrant
- environment, setting up with / Setting up the environment with Vagrant
- about / Introducing Vagrant
- installing / Installing Vagrant
- download page link / Installing Vagrant
- using / Using Vagrant
- variable expanding
- about / Working with strings
- variables
- about / Variables
- variable scope / Function declaration
- version control systems (VCS)
- V for view
- defining / V for view
- Twig, defining / Introduction to Twig
- book view / The book view
- layouts / Layouts and blocks
- blocks / Layouts and blocks
- paginated book list / Paginated book list
- sales view / The sales view
- error template / The error template
- login template / The login template
- views
- about / The MVC pattern
- visibility
- about / Properties and methods visibility
- private / Properties and methods visibility
- protected / Properties and methods visibility
- public / Properties and methods visibility
- working / Properties and methods visibility
W
- web applications
- about / Web applications
- web drivers
- types / Types of web drivers
- web forms
- submitting / A more complex example
- web page
- about / Web applications
- web servers
- about / Web servers
- working / How they work
- website
- about / Web applications
- while loop / While
X
- 2xx - success status codes
- 200 OK / 2xx – success
- 201 created / 2xx – success
- 202 accepted / 2xx – success
- 3xx - redirection status codes
- 301 moved permanently / 3xx – redirection
- 303 see other / 3xx – redirection
- 4xx - client error status codes
- 400 bad request / 4xx – client error
- 401 unauthorized / 4xx – client error
- 403 forbidden / 4xx – client error
- 404 not found / 4xx – client error
- 405 method not allowed / 4xx – client error
- 5xx - server error / 5xx – server error
Z
- Zend Framework 2
- about / Zend Framework 2
- ZIP file, Nginx
- reference / Installing Nginx