This is a quick (somewhat) reference for tools we can use in our development workflow.
-
COMPOSER Package and Dependency management for PHP
cd ~/Downloads
curl -sS https://getcomposer.org/installer | php
<?php | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
<?php | |
namespace Craft; | |
/** | |
* @=Path: A wrapper for the Craft Path Service API | |
* | |
* Path allows you to access the API in a very flexible and elegant way. | |
* | |
* @author Selvin Ortiz |
<?php | |
define('GRAVATAR', 'http://www.gravatar.com/avatar/'); | |
/** | |
* Requesting an image from gravatar.com | |
* | |
* @param str email The email address to use | |
* @param str size The desired image size i.e: 120 (images are square) | |
* @param boo wrap Whether to wrap the image in an <img> tag |
<?php | |
// PDO Connection to MySQL | |
$conn = new PDO('mysql:host=localhost;dbname=yourdbname', 'username', 'password'); | |
// PDO Connection to PostgreSQL | |
$conn = new PDO('pgsql:host=localhost;dbname=yourdbname', 'username', 'password'); | |
// A quick Select Query with For Loop | |
foreach ($conn->query("SELECT * FROM profile") as $row) | |
echo $row['fullname']; |
This is a quick (somewhat) reference for tools we can use in our development workflow.
COMPOSER Package and Dependency management for PHP
cd ~/Downloads
curl -sS https://getcomposer.org/installer | php
.ir { | |
font: 0px/0px monospace; | |
text-shadow: none; | |
color: transparent; | |
} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
@if(empty($title)) | |
<title>Company</title> | |
@else | |
<title>{{ $title }} | Company</title> | |
@endif | |
<link rel="stylesheet" type="text/css" href="/css/reusify.css"> |