Here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft CMS.
<?php | |
use Doctrine\ORM\Tools\Setup; | |
use Doctrine\ORM\EntityManager; | |
require_once "vendor/autoload.php"; | |
// Create a simple "default" Doctrine ORM configuration for Annotations | |
$isDevMode = true; | |
$config = Setup::createYAMLMetadataConfiguration(array(__DIR__), $isDevMode); |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.
I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:
- Register Roles
- Register Users
- Update Users
set :application, "App Name" # Your app name | |
set :repository, "[email protected]:xxxxx/xxx.git" # Your git repository | |
set :document_root, "/home/user/www/awesome_app" | |
set :deploy_via, :remote_cache | |
# SSH Settings | |
set :user, "user_ssh" | |
set :password, "password_ssh" | |
set :use_sudo, false |
This quick start guide is geared towards installing PHPUnit on OSX in order to run the WordPress unit tests. It uses homebrew to install PHP using homebrew-php. You can likely skip this step if you've already got php and pear installed properly.
If you use MAMP, then try these instructions to use MAMP's php and pear to install PHPUnit.
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
object(stdClass)#134 (16) { | |
["menu"]=> | |
string(0) "" | |
["container"]=> | |
bool(false) | |
["container_class"]=> | |
string(0) "" | |
["container_id"]=> | |
string(0) "" | |
["menu_class"]=> |
iframe { | |
max-width: 100%; | |
} |
<?php | |
use Doctrine\ORM\EntityManager, | |
Doctrine\ORM\Configuration, | |
Doctrine\ORM\Mapping\ClassMetadata; | |
/** | |
* Active Entity trait | |
* | |
* Limitations: a class can only ever be assocaited with ONE active entity manager. Multiple entity managers |