Skip to content

Instantly share code, notes, and snippets.

Adam Lundrigan adamlundrigan

Block or report user

Report or block adamlundrigan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hydrator.php
<?php
<<<CONFIG
packages:
- "zendframework/zendframework:~2.3"
CONFIG;
class Weather {
private $time;
private $rain;
@adamlundrigan
adamlundrigan / Db.php
Last active Aug 29, 2015
Expunge session usage from ZfcUser
View Db.php
<?php
namespace LdcZfcUserApigility\Authentication\Adapter;
use ZfcUser\Authentication\Adapter\Db as BaseAdapter;
use Zend\Authentication\Result as AuthenticationResult;
use Zend\Crypt\Password\Bcrypt;
use ZfcUser\Authentication\Adapter\AdapterChainEvent as AuthEvent;
class Db extends BaseAdapter
{
@adamlundrigan
adamlundrigan / CryptoTokenServerFactory.php
Last active Sep 21, 2016
Satellizer + Apigility (only direct login, no social integration)
View CryptoTokenServerFactory.php
<?php
namespace SatellizerServer\Factory;
use Zend\ServiceManager\DelegatorFactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
class CryptoTokenServerFactory implements DelegatorFactoryInterface
{
public function createDelegatorWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName, $callback)
{
@adamlundrigan
adamlundrigan / .gitignore
Last active Aug 29, 2015
PoC of Zend\ServiceManager bug
View .gitignore
*
!.gitignore
!run.php
!composer.json
!result.txt
@adamlundrigan
adamlundrigan / _instructions.md
Last active Aug 29, 2015
Multiple-EM-aware DoctrineModule CLI
View _instructions.md

Installation

  • Place the doctrine script below in your application's bin directory
  • Make it executable (or prepend php to the command below)

Usage

EM_ALIAS="my-custom-em" bin/doctrine 
View ScrollableResult
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Db
*/
View ZfcUser Open Issue Review.md
  • #5 is resolved by my PR#101
  • #94 duplicates the resolved issue #97
  • #99 is not an issue (someone trying to use ZfcUser latest head with ZF2b5)
  • #100 is duplicate of #99
@adamlundrigan
adamlundrigan / sqlite_count.output
Created May 11, 2012
Zend\Db\Adapter\Driver\Pdo\Result not returning row count?
View sqlite_count.output
$ php sqlite_count.php
Row Count: 0
Row 0: request_key=DCE2D890895CF02, email_address=foo@bar.com, request_time=2001-01-01 01:01:01,
@adamlundrigan
adamlundrigan / README.md
Created Apr 13, 2012
Having problems running Git command via a Phing exectask in a Git post-receive hook
View README.md

Problem

Running git command through a Phing ExecTask:

<exec command="git remote rm origin" dir="${build.src}" checkreturn="false" />

This works when phing build.setup is executed directly from command prompt. However, the same process fails when run from a Git post-receive hook with this message:

You can’t perform that action at this time.