This file contains hidden or 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 encode_to_utf8 ($input) { | |
$output = $input; | |
if($encoding == get_encoding($input)) { | |
$output = iconv($encoding, "UTF-8", $output); | |
} | |
return($output); | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<config> | |
<propel> | |
<datasources default="silextest"> | |
<datasource id="silextest"> | |
<adapter>mysql</adapter> <!-- sqlite, mysql, mssql, oracle, or pgsql --> | |
<connection> | |
<dsn>mysql:host=localhost;dbname=silextest</dsn> | |
<user>root</user> | |
<password>root</password> |
This file contains hidden or 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
->add('orderdatefrom', 'doctrine_orm_callback', | |
array | |
( | |
'callback' => function(\Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery $queryBuilder, $alias, $field, $options) | |
{ | |
if(!isset($options['value']) || !$options['value']) | |
{ | |
return; | |
} | |
$value = $options['value']; |
This file contains hidden or 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 | |
abstract class BaseUser | |
{ | |
protected $id; | |
public function getId() | |
{ | |
return $this->id; | |
} |
This file contains hidden or 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 Vendor\Bundle\Entity; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\Common\Collections\Collection; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Table(name="one") |
This file contains hidden or 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 Vendor\Bundle\Entity; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Table(name="many_a") | |
* @ORM\Entity |
This file contains hidden or 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 BlogController | |
{ | |
/** | |
* @var \Twig_Environment | |
*/ | |
protected $twig; | |
/** |
This file contains hidden or 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 Ibrows\GameBundle\Util; | |
class ObjectIterator implements \Iterator | |
{ | |
protected $objects = array(); | |
/** | |
* @param object $object |
This file contains hidden or 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 | |
$node = new \PHPParser_Node_Expr_MethodCall(new \PHPParser_Node_Expr_Variable('app'), 'match', array( | |
new \PHPParser_Node_Scalar_String('/'), | |
new \PHPParser_Node_Expr_Closure(array( | |
'stmts' => array( | |
new \PHPParser_Node_Stmt_Return( | |
new \PHPParser_Node_Expr_New( | |
new \PHPParser_Node_Name('\stdClass') | |
) |
This file contains hidden or 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 SimpleSoapClient | |
{ | |
/** | |
* @var string | |
*/ | |
protected $username; | |
/** |