In this lesson, learn how to use services and other useful objects like the service container in Symfony 3.
In this lesson, you'll learn how to find services you might want to use in the container by listing them.
In this lesson, you'll get a crash course in Twig. Covered here are the "say something" syntax, the "do something" syntax and for
loops. For broader coverage of Twig and the amazing things you can do with it, head over to the Twig Templating series.
Additional resources
In this lesson, you'll learn how to dress up the plain HTML that's being output in your Symfony app with a template layout using Twig's template inheritance feature. You'll learn how to use both block
and extends
Twig keywords to create, use, and re-use HTML layouts in your app. To explore more features in Twig, head over to the Twig Templating series.
Additional resources
In this lesson, you'll learn how to bring in CSS and JavaScript assets for use in the templates of your Symfony 3 app.
In this lesson, you'll learn how you can use Symfony 3 to create first-class APIs. We'll cover how to create endpoints, JSON controllers, and more.
In this tutorial we're going to add our $limit
variable as an optional argument to our get_pets()
function. We're using this variable in our if
statement, and we're going to look at different ways to supply "true" and "false" using data other than booleans. This allows you to pass in a value and still evaluate true/false. PHP has some conventions for what is true or not, and it's a good idea to understand what these are.
In this tutorial we're going to create pages for each of our pets by using a query parameter. This is a bit of code that is added to the end of a URL to pass information to PHP. They look something like ?id=23
. On the PHP side of things we'll use the $_GET
superglobal variable to pull that data into our code.
Our last big piece to the puzzle is to create a function to query the data for just one pet. In the process of doing this, we're going to get a lesson in function scope, where each function is its own little universe and you only have access to the arguments passed in and any variables you create in that function. This can trip you up when you need to access that data from another function. In this tutorial, we'll get that all sorted out and finish up our get_pet()
function.
Both get_pets()
and get_pet()
contain an SQL query where one part of it is a variable. Whenever you have this situation, you’re opening yourself up for an SQL injection attack. In this tutorial we'll see how this works by exploiting the security hole, and then fixing it up with prepared statements. Prepared statements let us build a query where the variable parts are kept separate from the rest of the query. This will conclude our work for this section of the site and managing databases.
An Integrated Development Environment (IDE) offers many code editing tools in one application, making your job as a developer much easier. In this introductory video from JetBrains, the creators of PhpStorm, you will see what an IDE has to offer.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
In this tutorial you will get an overview of the PhpStorm IDE interface. We'll look at the areas in the main window, including the toolbar, navigation, editor, and tool regions.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
This tutorial covers concepts you should understand when working with an IDE versus a text editor. We'll discuss how the concept of Projects works in PhpStorm, what Content Roots are, and how you can work with external Libraries.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
This tutorial breaks down the editor actions for PhpStorm. We take a look making mistakes in our code and how to see the errors and warnings that PhpStorm provides. We'll also work with the editor tabs, favorites, and bookmarks.
Corrections
At 2:22, the keyboard shortcut on Mac OS X should use the letter O, not N. Here are the correct commands and their alternatives for Mac OS X:
Navigate to Class by pressing Ctrl+N (command+O on Mac OS X)
Navigate to File by pressing Ctrl+Shift+N (shift+command+O on Mac OS X)
Navigate to Symbol by pressing Ctrl+Shift+Alt+N (option+command+O on Mac OS X)
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
In this PhpStorm tutorial we'll start working with some code in order to learn how to use code templates, and see the various ways that you can work with auto-completion and code generation options, which will save you a lot of time when coding. You'll also be able to see how the IDE provides you with solutions to fix errors in your code.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
All of your work in PhpStorm will happen within a project. In this tutorial, we'll look at how to create a new empty project, or start one from existing files. We walk through the different types of projects you can start with, including Composer, and HTML templates, like Foundation and Twitter Bootstrap. We also take a look at setting up a project with remote servers.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
PhpStorm can save you a lot of time by generating common code for you, including classes, constructors, getters, setters, and PHP doc blocks. We'll also look at common editor generation of things like loops.
See the written version of this tutorial for keyboard shortcuts.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
In this tutorial we'll explain what PSR-0 and PSR-4 namespacing is. Then we'll look at how to configure namespacing in PhpStorm 8. Drupal 8 is using PSR-4, so this is a really great tool to have when working in Drupal 8 projects.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
Many languages use the concept of namespaces. PHP uses it to group together classes. This tutorial shows you how to work efficiently with namespaces in PhpStorm.
Additional resources
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.
Composer is a great PHP package manager, and in this tutorial you'll see how to work with Composer from within the PhpStorm IDE. To learn more about Composer, watch The Wonderful World of Composer video tutorial.
Additional resources
Composer project
Packagist.org
Please note that this series covers PhpStorm versions 6 and 7 only.
For the latest documentation (including up-to-date videos), see JetBrains documentation.