Skip to content

Instantly share code, notes, and snippets.

View Majkl578's full-sized avatar
💥
breaking builds

Michael Moravec Majkl578

💥
breaking builds
View GitHub Profile
@Majkl578
Majkl578 / DoctrineLogger.php
Created May 9, 2010 13:11
Simple Doctrine 2 SQL Logger
<?php
namespace App;
use Nette\Web\Html;
class DoctrineLogger implements \Doctrine\DBAL\Logging\SQLLogger, \Nette\IDebugPanel
{
private $events = array();
/******** Doctrine\DBAL\Logging\SQLLogger *********/
<?php
namespace App\Controls;
class Foo extends \App\Basis\Control
{
}
<?php
use Nette\Application\AppForm;
class TestPresenter extends Nette\Application\Presenter
{
public function renderDefault()
{
$this['test']->render();
<?php
namespace Nette\Caching;
use Nette;
/**
* APC caching storage
* @author Michael Moravec
*/
<?php
namespace App\Basis;
use Doctrine, Nette, Nette\Web\Html;
/**
* @author Štěpán Svoboda
* @author Michael Moravec
*/
<?php
class Foo
{
public $bar;
public function __construct()
{
$this->update(5);
}
<?php
namespace DataGrid\DataSources\Dibi;
use Nette,
DataGrid\DataSources\IDataSource,
DataGrid\DataSources,
dibi,
DibiDataSource;
/**
<?php
namespace DataGrid\DataSources\Dibi;
use DataGrid\DataSources\IDataSource,
DataGrid\DataSources,
dibi;
/**
* Dibi fluent based data source
<?php
Nette\Debug::enable(array('12.34.56.78, 11.22.33.44'), NULL,'xxx@gmail.com');
$application->catchExceptions = Nette\Environment::isProduction();
<?php
/* namespace DJPW; */
/**
* Perform transformation of BBCodes
*
* @copyright 2010 Diskuze.JakPsatWeb.cz
*/
final class BBCode