Skip to content

Instantly share code, notes, and snippets.

@vasildakov-zz
vasildakov-zz / index.php
Created February 5, 2017 18:54 — forked from tuupola/index.php
Use JWT Authentication middleware with ZF Expressive
<?php
use Zend\Expressive\AppFactory;
use Firebase\JWT\JWT;
use Slim\Middleware\JwtAuthentication;
chdir(dirname(__DIR__));
require "vendor/autoload.php";
$app = AppFactory::create();
<?php
/*
Original version:
written by Jarrod Oberto
taken from http://net.tutsplus.com/tutorials/php/image-resizing-made-easy-with-php/
Example usage:
include("classes/Resize.php");
@vasildakov-zz
vasildakov-zz / cli-config.php
Created May 7, 2016 20:28 — forked from geerteltink/cli-config.php
Zend Expressive Doctrine Factory and Redis Cache
<?php
/**
* Configuration for doctrine cli.
*
* This file is auto detected and used by doctrine cli.
*/
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\ORM\EntityManager;
@vasildakov-zz
vasildakov-zz / User.php
Last active August 29, 2015 14:12 — forked from Ocramius/User.php
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
<?php
class PostEntity
{
private $id;
private $user;
private $title;
private $content;
private $date;
<?php
namespace Ocramius\Auth\Storage;
use Entity\Ocramius\Admin as AdminEntity,
Doctrine\ORM\EntityManager;
/**
* An @see \Zend_Auth_Storage_Session that handles @see AdminEntity items
* @author Marco Pivetta <ocramius@gmail.com>
*/