Merge branch 'gh-pages' of github.com:codeguy/php-the-right-way into gh-pages

This commit is contained in:
Phil Sturgeon
2014-03-23 17:53:22 -04:00
58 changed files with 115 additions and 11 deletions

View File

@@ -88,7 +88,7 @@ included in the project:
## Contribution Agreement and Usage
By subitting a pull request to this repository, you agree to allow the project
By submitting a pull request to this repository, you agree to allow the project
owners to license your work under the the terms of the [Creative Commons Attribution-NonCommercial-ShareAlike
3.0 Unported License](http://creativecommons.org/licenses/by-nc-sa/3.0/).

View File

@@ -47,6 +47,7 @@ developers know where to find good information!
* [Bulgarian](http://bg.phptherightway.com)
* [German] (http://rwetzlmayr.github.io/php-the-right-way)
* [Turkish](http://hkulekci.github.io/php-the-right-way/)
* [Slovenian](http://sl.phptherightway.com)
### Translations

View File

@@ -33,6 +33,7 @@ _PHP: The Right Way_ is (or soon will be) translated into many different languag
* [Bulgarian](http://bg.phptherightway.com/)
* [German](http://rwetzlmayr.github.io/php-the-right-way/)
* [Turkish](http://hkulekci.github.io/php-the-right-way/)
* [Slovenian](http://sl.phptherightway.com)
## How to Contribute

View File

@@ -35,11 +35,24 @@
<li><a href="/#site-header">Welcome</a></li>
{% assign lastIsChild = false %}
{% for post in site.posts reversed %}
{% if post.isChild and lastIsChild != true %}<ul>{% endif %}
{% if lastIsChild and post.isChild != true %}</ul>{% endif %}
<li><a href="/#{{ post.title | downcase | replace:' ','_' | replace:'(','' | replace:')','' | replace:'.','' | replace:'-','' }}">{{ post.title }}</a>
{% if post.isChild != true %}
{% if insideSection %}
</ul>
</li>
{% assign insideSection = false %}
{% endif %}
{% endif %}
<li><a href="/#{{ post.anchor }}">{{ post.title }}</a>
{% if post.isChild %}
</li>
{% else %}
<ul>
{% assign insideSection = true %}
{% endif %}
{% assign lastIsChild = post.isChild %}
{% endfor %}
</ul>
</li>
<li><a href="/#site-footer">Credits</a></li>
</ul>
</nav>

View File

@@ -1,2 +1,6 @@
---
anchor: getting_started
---
# Getting Started {#getting_started_title}

View File

@@ -1,9 +1,10 @@
---
title: Use the Current Stable Version (5.5)
isChild: true
anchor: use_the_current_stable_version
---
## Use the Current Stable Version (5.5) {#use_the_current_stable_version_55_title}
## Use the Current Stable Version (5.5) {#use_the_current_stable_version_title}
If you are just getting started with PHP make sure to start with the current stable release of [PHP 5.5][php-release]. PHP has made great strides adding powerful [new features](#language_highlights) over the last few years. Don't let the minor version number difference between 5.2 and 5.5 fool you, it represents _major_ improvements. If you are looking for a function or its usage, the documentation on the [php.net][php-docs] website will have the answer.

View File

@@ -1,6 +1,7 @@
---
title: Built-in Web Server
isChild: true
anchor: builtin_web_server
---
## Built-in web server {#builtin_web_server_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: mac_setup
---
## Mac Setup {#mac_setup_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: windows_setup
---
## Windows Setup {#windows_setup_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: vagrant
---
## Vagrant {#vagrant_title}

View File

@@ -1,3 +1,7 @@
---
anchor: code_style_guide
---
# Code Style Guide {#code_style_guide_title}
The PHP community is large and diverse, composed of innumerable libraries, frameworks, and components. It is common for

View File

@@ -1 +1,5 @@
---
anchor: language_highlights
---
# Language Highlights {#language_highlights_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: programming_paradigms
---
## Programming Paradigms {#programming_paradigms_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: namespaces
---
## Namespaces {#namespaces_title}

View File

@@ -1,6 +1,7 @@
---
title: Standard PHP Library
isChild: true
anchor: standard_php_library
---
## Standard PHP Library {#standard_php_library_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: command_line_interface
---
## Command Line Interface {#command_line_interface_title}

View File

@@ -1,6 +1,7 @@
---
title: XDebug
isChild: true
anchor: xdebug
---
## XDebug {#xdebug_title}

View File

@@ -1,3 +1,7 @@
---
anchor: dependency_management
---
# Dependency Management {#dependency_management_title}
There are a ton of PHP libraries, frameworks, and components to choose from. Your project will likely use several of them — these are project dependencies. Until recently, PHP did not have a good way to manage these project dependencies. Even if you managed them manually, you still had to worry about autoloaders. No more.

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: composer_and_packagist
---
## Composer and Packagist {#composer_and_packagist_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: pear
---
## PEAR {#pear_title}

View File

@@ -1 +1,5 @@
---
anchor: coding_practices
---
# Coding Practices {#coding_practices_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: the_basics
---
## The Basics {#the_basics_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: date_and_time
---
## Date and Time {#date_and_time_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: design_patterns
---
## Design Patterns {#design_patterns_title}

View File

@@ -1,5 +1,6 @@
---
title: Dependency Injection
anchor: dependency_injection
---
# Dependency Injection {#dependency_injection_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: basic_concept
---
## Basic Concept {#basic_concept_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: complex_problem
---
## Complex Problem {#complex_problem_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: containers
---
## Containers {#containers_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: further_reading
---
## Further Reading {#further_reading_title}

View File

@@ -1,5 +1,6 @@
---
title: Databases
anchor: databases
---
# Databases {#databases_title}

View File

@@ -1,5 +1,6 @@
---
title: Errors and Exceptions
anchor: errors_and_exceptions
---
# Errors and Exceptions {#errors_and_exceptions_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: errors
---
## Errors {#errors_title}
@@ -102,8 +103,11 @@ This is most useful when you're debugging code and suspect an informative error
* [Error Control Operators](http://php.net/manual/en/language.operators.errorcontrol.php)
* [SitePoint](http://www.sitepoint.com/)
* [xDebug](http://xdebug.org/docs/basic)
* [Scream](http://www.php.net/manual/en/book.scream.php)
* [xDebug]
* [Scream]
[xDebug]: http://xdebug.org/docs/basic
[Scream]: http://www.php.net/manual/en/book.scream.php
### ErrorException

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: exceptions
---
## Exceptions {#exceptions_title}

View File

@@ -1 +1,5 @@
---
anchor: security
---
# Security {#security_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: web_application_security
---
## Web Application Security {#web_application_security_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: password_hashing
---
## Password Hashing {#password_hashing_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: data_filtering
---
## Data Filtering {#data_filtering_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: configuration_files
---
## Configuration Files {#configuration_files_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: register_globals
---
## Register Globals {#register_globals_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: error_reporting
---
## Error Reporting {#error_reporting_title}

View File

@@ -1,3 +1,7 @@
---
anchor: testing
---
# Testing {#testing_title}
Writing automated tests for your PHP code is considered a best practice and can lead to well-built

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: test_driven_development
---
## Test Driven Development {#test_driven_development_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: behavior_driven_development
---
## Behavior Driven Development {#behavior_driven_development_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: complementary_testing_tools
---
## Complementary Testing Tools {#complementary_testing_tools_title}

View File

@@ -1,3 +1,7 @@
---
anchor: servers_and_deployment
---
# Servers and Deployment {#servers_and_deployment_title}
PHP applications can be deployed and run on production web servers in a number of ways.

View File

@@ -1,9 +1,10 @@
---
title: Platform as a Service (PaaS)
isChild: true
anchor: platform_as_a_service
---
## Platform as a Service (PaaS) {#platform_as_a_service_paas_title}
## Platform as a Service (PaaS) {#platform_as_a_service_title}
PaaS provides the system and network architecture necessary to run PHP applications on the web. This means little to no
configuration for launching PHP applications or PHP frameworks.

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: virtual_or_dedicated_servers
---
## Virtual or Dedicated Servers {#virtual_or_dedicated_servers_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: shared_servers
---
## Shared Servers {#shared_servers_title}

View File

@@ -1,8 +1,9 @@
---
isChild: true
anchor: building_and_deploying_your_application
---
## Building and Deploying your Application {#build_title}
## Building and Deploying your Application {#building_and_deploying_your_application_title}
If you find yourself doing manual database schema changes or running your tests manually before updating your files
(manually), think twice! With every additional manual task needed to deploy a new version of your app, the chances for

View File

@@ -1,3 +1,7 @@
---
anchor: caching
---
# Caching {#caching_title}
PHP is pretty quick by itself, but bottlenecks can arise when you make remote connections, load files, etc.

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: bytecode_cache
---
## Bytecode Cache {#bytecode_cache_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: object_caching
---
## Object Caching {#object_caching_title}

View File

@@ -1,3 +1,7 @@
---
anchor: resources
---
# Resources {#resources_title}
## From the Source

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: frameworks
---
## Frameworks {#frameworks_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: components
---
## Components {#components_title}
@@ -25,6 +26,7 @@ itself.
* [Aura](http://auraphp.github.com/)
* [FuelPHP](https://github.com/fuelphp)
* [Hoa Project](https://github.com/hoaproject)
* [Orno](https://github.com/orno)
* [Symfony Components](http://symfony.com/doc/current/components/index.html)
* [The League of Extraordinary Packages](http://thephpleague.com/)
* Laravel's Illuminate Components

View File

@@ -1,3 +1,7 @@
---
anchor: community
---
# Community {#community_title}
The PHP community is as diverse as it is large, and its members are ready and willing to support new PHP programmers. Consider joining your local PHP user group (PUG) or attending larger PHP conferences to learn more about the best practices shown here. You can hang out on IRC in the #phpc channel on [irc.freenode.com][php-irc] and follow the [@phpc][phpc-twitter] twitter account. Get out there, meet new developers, learn new topics, and above all, make new friends! Other community resources include the Google+ PHP [Programmer community][php-programmers-gplus] and [StackOverflow][php-so].

View File

@@ -11,7 +11,7 @@ description: "An easy-to-read, quick reference for PHP best practices, accepted
{% if post.isChild != true and loop.first != true %}
{{ backtotop|markdownify }}
{% endif %}
<div id="{{ post.title | downcase | replace:' ','_' | replace:'(','' | replace:')','' | replace:'.','' | replace:'-','' }}">
<div id="{{ post.anchor }}">
{{ post.content }}
</div>
{% endfor %}

View File

@@ -5,7 +5,7 @@ title: Design Patterns
# Design Patterns
There are numerous ways to structure the code and project for you web application, and you can put as much or as little
There are numerous ways to structure the code and project for your web application, and you can put as much or as little
thought as you like into architecting. But it is usually a good idea to follow common patterns because it will make
your code easier to manage and easier for others to understand.