Skip to content

Instantly share code, notes, and snippets.

View dlanz's full-sized avatar

Dan Lanza dlanz

  • NY
View GitHub Profile
@dlanz
dlanz / AbstractAutomobile.php
Last active May 18, 2017 20:18
Type Hinting
namespace Automobiles;
Abstract class AbstractAutomobile implements AutomobileInterface
{
//A find usages on this method returns both usages in DrivingTest.php on lines 19 and 20
//if I choose to search its base method. Otherwise this finds nothing.
abstract public function loadPassengers();
}
@dlanz
dlanz / fpdi.php
Last active October 12, 2016 18:12
<?php
/*
* Code to populate $mergeType, $mergePath and $pathArr['pdf_id'].
*/
$toMerge = $file->getMergeFileList($mergeType, $mergePath, $pathArr['pdf_id'], "BOTH");
function cmp($a, $b) {
if ($a['HZORD#'] == $b['HZORD#']) {
return 0;
}
@dlanz
dlanz / index.php
Last active March 29, 2016 14:45 — forked from phpdave/index.php
"C:\xampp\php\php.exe" "C:\MyProjects\WebDriverTests\index.php"
<?php
require_once('vendor/autoload.php');
$_SERVER['APPLICATION_ENV']='development';
$_SERVER['APPLICATION_URL_PREFIX']='development.';
StartSeleniumServer();
RunTests();
function RunTests()
{
$tries=100;
@dlanz
dlanz / bootstrap.php
Created December 21, 2015 13:37 — forked from jordiwes/bootstrap.php
bootstrap zend\db into a procedural script
<?php
/**
* bootstrap.php
* Bootstraps an application.
*
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)