Skip to content

Instantly share code, notes, and snippets.

View keltanas's full-sized avatar
🇷🇺
justice will be served

Ke7Tana5 keltanas

🇷🇺
justice will be served
  • Saint Petersburg
View GitHub Profile
@keltanas
keltanas / vkmixin.py
Created January 27, 2016 14:43 — forked from adilkhash/vkmixin.py
Vkontakte Oauth 2.0 Mixin
#!/usr/bin/env python
#
# Vkontatke OAuth 2.0 wrapper
# Copyright 2011, Adil Khashtamov [adil.khashtamov@gmail.com]
# http://khashtamov.kz
#
#
import logging
<?php
namespace Linkofy\CommonBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
class Builder extends ContainerAware
{
public function mainMenu(FactoryInterface $factory, array $options)

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related

@keltanas
keltanas / testClosure.php
Created December 13, 2012 17:36 — forked from anonymous/testClosure.php
Вернем анонимную функцию, которая берет $this от родительского метода и возвращает его. Работает в PHP 5.4+ Демонстрирует видимость переменной $this в замыкании (в PHP 5.3 замыкать объект приходится через техническую переменную)
<?php
class test
{
public function do_test()
{
return function() {
return $this;
};
}
}