Skip to content

Instantly share code, notes, and snippets.

View agitso's full-sized avatar

Agitso agitso

View GitHub Profile
@agitso
agitso / Color.php
Created August 26, 2013 18:29
Another VO
<?php
namespace Famly\Core\Value;
use Doctrine\ORM\Mapping as ORM;
use TYPO3\Flow\Annotations as Flow;
/**
* @Flow\ValueObject
*/
class Color {
@agitso
agitso / Name.php
Created August 26, 2013 18:17
Example value object.
<?php
namespace Famly\Core\Value;
use Doctrine\ORM\Mapping as ORM;
use TYPO3\Flow\Annotations as Flow;
/**
* @Flow\ValueObject
*/
class Name {
@agitso
agitso / rgst
Created February 26, 2013 15:33
PHP Cli script to do a recursive git status
#!/usr/bin/php
<?php
$repos = array();
exec('find . -type d -name .git | sed -e "s/\.git//"', $repos);
foreach ($repos as $repo) {
$status = shell_exec("cd $repo && git status");
if (false == strpos($status, 'nothing to commit, working directory clean')) {
echo "$repo\n" . str_repeat('-', strlen($repo)) . "\n$status\n\n";
}
}
@agitso
agitso / EmailBackend.php
Created February 26, 2013 11:47
Add a custom logger backend to TYPO3 Flow
<?php
namespace Ag\Utility\Log\Backend;
use TYPO3\Flow\Annotations as Flow;
class EmailBackend extends \TYPO3\Flow\Log\Backend\AbstractBackend {
/**
* @var string|array
*/
@agitso
agitso / CliEmailService.php
Created February 26, 2013 11:08
Use TYPO3 Flow UriBuilder in a non-controller context (fx. in a service that is used by command controller)
<?php
...
/**
* @var \TYPO3\Flow\Mvc\Routing\UriBuilder
*/
protected $uriBuilder;
/**