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 | |
require_once dirname(__FILE__).'/../../../../../test/phpunit/bootstrap/unit.php'; | |
class unit_majaxMediaFilenameBuilderTest extends sfPHPUnitBaseTestCase | |
{ | |
protected $builder = null; | |
protected function setUp() | |
{ |
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
User: | |
columns: | |
name: { type: string(255), notnull: true } | |
Post: | |
columns: | |
content: { type: clob } | |
author_id: { type: integer } | |
editor_id: { type: integer } | |
relations: |
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 | |
function processFile($file) | |
{ | |
$file = file_get_contents($file); | |
$book = array(); | |
list($junk, $cont) = explode('<hr>', $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
protected $event = null; | |
public function onSecurityInteractiveLogin(InteractiveLoginEvent $event) | |
{ | |
$this->event = $event; | |
$username = $this->getUsername(); | |
$session = $this->getSession(); | |
$this->setFlash($session, $username); | |
} | |
protected function getUsername() |
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 Knowhow\UserBundle\Listeners; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; | |
class LoginListener implements EventSubscriberInterface | |
{ |
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 SomeForm | |
{ | |
// ... snip ... | |
public function saveEmbeddedForms($con = null, $forms = null) | |
{ |
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 | |
/** | |
* Photo filter form. | |
* | |
* @package cms | |
* @subpackage filter | |
* @author JMather | |
* @version SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ | |
*/ |
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
$script = " | |
<script type=\"text/javascript\"> | |
(function() { | |
var id = '$id'; | |
var augment_id = id+'_messages'; | |
var url = '$splitter_url'; | |
var callUpdateTimeout = null; | |
var updateFunction = function() { |
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 Majax\PortalBundle\Builder; | |
use Symfony\Bundle\DoctrineBundle\Registry; | |
class SiteListBuilder { | |
/** @var \Symfony\Bundle\DoctrineBundle\Registry */ | |
private $orm; | |
public function __construct($orm) |
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
public function isEmpty() | |
{ | |
$method = new \ReflectionMethod( | |
$this->_objectOrClassName, | |
$this->_methodName | |
); | |
list(,$path,) = explode(PHP_EOL, (string)$method); | |
preg_match('/(@@ )(.*\.php)( )(\d+)(\D*)(\d+)/', $path, $matches); | |
list ($path, $start, $end) = array( | |
$matches[2], $matches[4], $matches[6] |