Skip to content

Instantly share code, notes, and snippets.

@vasildakov-zz
vasildakov-zz / IsUserProvisionalStatusExpired.php
Last active October 16, 2015 15:05
IsUserProvisionalStatusExpired
<?php
/**
* IsUserProvisionalStatusExpired
*
* @author Vasil Dakov <vasil.dakov@philippka.com>
* @copyright Copyright (c) 2014-2015 U.S. Soccer Federation (http://www.ussoccer.com)
*/
namespace Application\Entity\Specification\UserProvisionalStatus;
<?php
interface Report {
}
@vasildakov-zz
vasildakov-zz / Entity.php
Created July 14, 2015 12:49
Specification Pattern
<?php
namespace App\Entity;
abstract class Entity
{
public function getId() {
return $this->id;
}
}
@vasildakov-zz
vasildakov-zz / Test.java
Last active August 29, 2015 14:13
Hristo Test
import java.util.*;
class Test {
public static void main(String[] args)
{
// the withdraw amount
Scanner scb = new Scanner(System.in);
System.out.println("Please enter the amount you want to withdraw");
int withdraw = scb.nextInt();
@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
@vasildakov-zz
vasildakov-zz / Module.php
Last active November 21, 2021 05:32
ZF2 and Doctrine Entity listeners resolver
<?php
namespace Application;
class Module
{
public function onBootstrap(MvcEvent $e)
{
$application = $e->getTarget();
$serviceManager = $application->getServiceManager();
$sharedManager = $application->getEventManager()->getSharedManager();
<?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>
*/
@vasildakov-zz
vasildakov-zz / gist:9786091
Last active August 29, 2015 13:57
add a conversion object to doctrine collection
<?php
class ConversionController extends Controller {
public function create()
{
$dc = new Doctrine_Collection('Conversion');
if ($dc instanceof Doctrine_Collection) {
for($i =0; $i < 10; $i++) {