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 | |
/** | |
* Company | |
* | |
* This class has been auto-generated by the Doctrine ORM Framework | |
* | |
* @package winston | |
* @subpackage model | |
* @author Clement Herreman <[email protected]> |
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 | |
$badDate = '2010-13-03'; | |
$date = DateTime::createFromFormat('Y-m-d', $badDate); | |
var_dump($date); | |
/* | |
object(DateTime)#284 (3) { | |
["date"]=> | |
string(19) "2011-01-03 10:01:20" |
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 Person | |
{ | |
private $phone; | |
private $name; | |
public function __construct($name, $phone) | |
{ | |
var_dump($name); | |
var_dump($phone); |
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 DocumentIdentificationForm extends DocumentForm | |
{ | |
protected function doUpdateObject($values) | |
{ | |
parent::doUpdateObject($values); | |
if ($values['author_id']) | |
$this->getObject()->setStatusId(Doctrine_Core::getTable('Status')->getIdentifiedStatus()); | |
else |
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 foo() | |
{ | |
return bar; | |
} | |
echo foo(); // outputs 'bar'. And no error/exception, only a small warning. |
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 | |
$t->diag('->run()'); | |
$message = "->run() lance une exception si le BatchDownload n'est pas initialisé"; | |
try | |
{ | |
$bd->run(); | |
$t->fail($message); | |
} | |
catch (Exception $e) | |
{ |
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 | |
$documentExtractor = new DocumentExtractor( | |
$ftpDir, | |
sfConfig::get('sf_test_dir').'/web/documents' | |
); | |
$mock = m::mock($documentExtractor); | |
$mock->shouldReceive('getDistantControlDir') | |
->with(true) | |
->andThrow('sfException', 'Mock exception'); |
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 webserviceMagento { | |
public construct($dependency = null) | |
{ | |
if (is_null($dependency)) | |
{ | |
// Instanciate your dependencies by yourself! | |
} | |
} | |
} |
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 Test | |
{ | |
private $message; | |
public function __construct() | |
{ | |
$this->message = 'Omg this can be called?'; | |
} |
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 CapWebndfTestFunctionnal extends sfTestFunctional | |
{ | |
/** | |
* Login as a user | |
* @param string $username User's username | |
*/ | |
public function signInAs($username) | |
{ |
OlderNewer