Skip to content

Instantly share code, notes, and snippets.

@MacDada
MacDada / Imagick.php
Created November 20, 2012 16:05
Best way to have custom methods for vendor classes
<?php
namespace MyStuff\Imagick;
/**
* Option 1: My Imagick extending the original one with custom methods
*/
class Imagick extends \Imagick
{
public function customMethod($param)
<?php
$cacheId = 'xyz';
$cacheDriver = new \Doctrine\Common\Cache\ApcCache();
if ($cacheDriver->contains($cacheId)) {
return $cacheDriver->fetch($cacheId);
}
@MacDada
MacDada / gist:1919306
Created February 26, 2012 22:12
My Symfony2 projects .gitignore file
#### OSX etc ####
.DS_Store*
Icon?
Thumbs.db
ehthumbs.db
*.swp
*.out
/nbproject/
*.lock
*~