Skip to content

Instantly share code, notes, and snippets.

@pmjones
pmjones / gist:8074310
Last active January 1, 2016 01:39
removed trait and interface from class count
SILEX="silex-1.1.2"
AURA="Aura.Web_Project"
rm -rf $SILEX
rm -rf $AURA
echo ""
echo "=================================================="
echo "Install Silex 1.1.2 and remove tests"
echo "=================================================="
==================================================
Install Silex 1.1.2 and remove tests
==================================================
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing psr/log (1.0.0)
Loading from cache
- Installing symfony/routing (v2.4.0)
diff --git a/src/Aura/Marshal/Entity/GenericEntity.php b/src/Aura/Marshal/Entity/GenericEntity.php
index 8e643eb..cc2d82d 100644
--- a/src/Aura/Marshal/Entity/GenericEntity.php
+++ b/src/Aura/Marshal/Entity/GenericEntity.php
@@ -22,4 +22,29 @@ use Aura\Marshal\Data;
class GenericEntity extends Data
{
use MagicArrayAccessTrait;
+
+ /**
<?php
$pdo = new PDO('sqlite::memory:');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec('CREATE TABLE foo (bar VARCHAR(20))');
$sth = $pdo->prepare('INSERT INTO foo (bar) VALUES (:bar)');
var_dump($sth);
$sth->execute(array('bar' => 'bar'));
$sth->execute(array('bar' => null));
<?php
require "../autoload.php";
$pdo = new Aura\Sql\ExtendedPdo('sqlite::memory:');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec('CREATE TABLE foo (bar VARCHAR(20))');
$stm = 'INSERT INTO foo (bar) VALUES (:bar)';
[15:42:41] <jcarouth> no view object, no care.
[15:42:52] <jcarouth> should have refactored to Smarty
[15:42:58] <GrumpyCanuck> Savant
[15:43:41] <jcarouth> smarty is just a facade to savant i think
[15:44:00] <GrumpyCanuck> I dare you to say that to pmjones' face
[15:44:47] <mfrost503> oh snapz
[15:44:56] <jcarouth> no, i'll pass. I already did some minor trolling of the sort with him at mwphp
[15:44:59] <jcarouth> i got my little joke in
[15:46:00] <chasep_work> Savant and Smarty are different... Honestly, I don't see much difference between Savant and just using inline PHP to create templates
[15:46:21] <elazar> Basically is, just with predefined structure. ;)
PACKAGE=$1
BASE=`pwd`
DIR="${BASE}/Aura.${PACKAGE}"
AUTH="${BASE}/Aura.Auth"
# change to package dir
cd $DIR
git pull
# fix .gitignore and .travis.yml
<h1> Aura for PHP</h1>
<dl>
<dt>1. <a href="libraries/">Library Packages</a></dt>
<dd><dl>
<dt>1.1. <a href="libraries/autoload.html#1.1">Aura.Autoload</a></dt>
<dd><dl>
<dt>1.1.1. <a href="libraries/autoload.html#1.1.1">Foreword</a></dt>
<dd><dl>
<dt>1.1.1.1. <a href="libraries/autoload.html#1.1.1.1">Installation</a></dt>
<dt>1.1.1.2. <a href="libraries/autoload.html#1.1.1.2">Quality</a></dt>
@pmjones
pmjones / gist:048451f929b75ebe2cf4
Created March 8, 2015 20:47
PHPDocumentor and Markdown
### This command line session ...
$ mkdir phpdoctest
$ cd phpdoctest/
$ git clone git@github.com:auraphp/Aura.Dispatcher
Cloning into 'Aura.Dispatcher'...
remote: Counting objects: 455, done.
remote: Total 455 (delta 0), reused 0 (delta 0), pack-reused 455
Receiving objects: 100% (455/455), 85.18 KiB | 0 bytes/s, done.
Resolving deltas: 100% (265/265), done.
<?php
error_reporting(E_ALL|E_STRICT);
class Foo
{
public function zim()
{
}
}
class Bar extends Foo