Skip to content

Instantly share code, notes, and snippets.

View command.php
<?php
namespace CampaignBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Uneak\HighConnexionSmsBundle\Sms\HighConnexionMessage;
class MessageStatusCommand extends ContainerAwareCommand {
View controller.php
<?php
namespace ProspectMessageBundle\Controller;
use Cocur\Slugify\Slugify;
use FOS\RestBundle\Controller\Annotations\Route;
use ProspectMessageBundle\Entity\ProspectMoMessage;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
View migration.php
<?php
namespace Uneak\ProspectBundle\Command;
use libphonenumber\NumberParseException;
use libphonenumber\PhoneNumber;
use libphonenumber\PhoneNumberFormat;
use libphonenumber\PhoneNumberUtil;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
View action.php
<?php
public function campaignSmsAction(Request $request) {
$all = $request->query->all();
$log = serialize($all);
$dir = '/home/happysmsfr/www/process';
if (isset($all['tag'])) {
$slugify = new Slugify();
$file = $slugify->slugify($all['tag']).".process";
View process.php
<?php
namespace CampaignBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Uneak\HighConnexionSmsBundle\Sms\HighConnexionMessage;
class MessageStatusCommand extends ContainerAwareCommand {
@uneak
uneak / config
Last active Feb 28, 2016
Git hooks mysql dump automatisation
View config
#!/bin/sh
# db info
host="DBHOST"
user="DBUSER"
pass="DBPASS"
name="DBNAME"
# path info
project="/var/www/uneak"