This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ClientSymfonyLoggerObserver implements SplObserver { | |
private function update(SplSubject $subject) { | |
sfContext::getInstance()->getLogger()->info("Calling service " . get_class($subject->getService()) . " with url {$subject->getService()->getUrl()}"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name vietnameseinshoreditch.co.uk; | |
rewrite ^ http://shoreditchvietnamese.co.uk$request_uri? permanent; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file = '/home/moz/Desktop/canon-ixus.jpg'; | |
$i = new Imagick($file); | |
print_r($i->getImageProperties('exif:*')); | |
$i->stripImage(); | |
$i->writeImage($file . '2'); | |
$i->readImage($file . '2'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace JMOZ\FoursquareBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use JMOZ\FoursquareBundle\Entity\Checkin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace TimeOut\Bundle\SecurityBundle\DataFixtures; | |
use Doctrine\Common\DataFixtures\FixtureInterface; | |
use TimeOut\Bundle\SecurityBundle\Entity\User; | |
use TimeOut\Bundle\SecurityBundle\Entity\Role; | |
/** | |
* Load test users. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace JMOZ\Bundle\SecurityBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\Security\Core\Role\RoleInterface; | |
/** | |
* Role Entity | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace JMOZ\Bundle\SecurityBundle\Tests\Functional; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
use JMOZ\Bundle\SecurityBundle\Entity\User; | |
use JMOZ\Bundle\SecurityBundle\DataFixtures\LoadSecurityData; | |
/** | |
* @author James Morris <james@jmoz.co.uk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace JMOZ\Bundle\SecurityBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\Common\Collections\Collection; | |
use FOS\UserBundle\Model\User as BaseUser; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jms_security_extra: | |
expressions: true | |
method_access_control: | |
'^TimeOutTaxonomyAdminBundle:Default:.*': 'hasRole("ROLE_TAXONOMY_VIEW")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# crucial to allow the install.sh script to update Silex | |
unset GIT_DIR | |
GIT_WORK_TREE=/home/myuser/mysilexapp.git git checkout -f | |
# I like to do a sanity check of the files as there's no output from git checkout | |
ls -la /home/myuser/mysilexapp/ | |
# execute an install script seperating project logic from git | |
/home/myuser/mysilexapp/install.sh |