Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed PHP Standards and Best Practices!
You have completed PHP Standards and Best Practices!
Preview
Now that we know how Composer works, we can look into how packages are distributed and how you can package up your code to be used by other developers.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
They all have an index.php and run in the
browser.
0:00
A component, sometimes called a package
interchangeably,
0:01
does not run in the browser, but is used
by an application or another component.
0:04
That means we need to approach them
slightly differently, but
0:08
they're still quite similar.
0:10
Let's have a go at making a really basic
component with a simple structure.
0:12
Then we can look at how we write classes
and
0:15
how we check to see if they work when we
build them.
0:17
First, we'll need an SRC folder, which is
where all of our code will live.
0:20
Inside there we're going to create a
single class called Example.php.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up