Skip to content

Instantly share code, notes, and snippets.

View marcelog's full-sized avatar

Marcelo Gornstein marcelog

View GitHub Profile
<?php
require_once __DIR__ . '/bootstrap.php';
if ($argc < 2) {
echo "Missing job name";
exit (254);
}
$jobName = $argv[1];
$job = new $jobName;
#!/bin/bash
# Get our base directory (the one where this script is located)
me=$(dirname ${0})
root=${me}/../..
root=`cd ${root}; pwd`
# Try to include the well known config file.
configFile=${root}/config/cli.properties
#!/bin/bash
# Get our base directory (the one where this script is located)
me=$(dirname ${0})
root=${me}/../..
root=`cd ${root}; pwd`
# Try to include the well known config file.
configFile=${root}/config/cli.properties
pear.doctrine-project.org/DoctrineORM
pear.marcelog.name/Ding
pear.apache.org/log4php/Apache_log4php
# System locations for installed php and pear. You can
# touch/change these ones and try with other php versions.
php=/usr/bin/php
pear=/usr/bin/pear
vendors=${root}/vendor
config=${root}/config
myphppath=${vendors}/php
# The include path for all the applications will be
|~bin/
| |~setup/
| | `-install-dependencies.sh*
| |-bootstrap.php
| |-jobRunner.php
| `-run.sh*
|~config/
| |~setup/
| | `-dependencies
| |-cli.properties
<?php
$userDomainService->createUser('john', 'pass');
$user = $userDomainService->getById(1);
| DEBUG | Execution of Domain\Service\AbstractService::setLogger took: 0.00006
| DEBUG | Execution of Domain\Service\User::setContainer took: 0.00005
| DEBUG | Serving for: Domain\Service\User::createUser
| DEBUG | Beginning transaction
| DEBUG | Dispatching event: newUserCreated
| DEBUG | New user: john
| DEBUG | Commiting transaction
| DEBUG | Execution of Domain\Service\User::createUser took: 0.01331
| DEBUG | Serving for: Domain\Service\User::getById
| DEBUG | Beginning transaction
<?php
namespace Listeners;
use Ding\Logger\ILoggerAware;
/**
* @Component
* @ListensOn(value=newUserCreated)
*/
class NewUser implements ILoggerAware