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
$javascript = <<<JS | |
function javascriptFunction() | |
{ | |
/* Some javascript code here */ | |
} | |
JS; |
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 | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\Reference; | |
// Create IoC container | |
$container = new ContainerBuilder(); | |
// Register Engine object and parameter for constructor | |
$container->register('my.engine', '\\Model\\Engine') |
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 | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\Reference; | |
class Tractor | |
{ | |
/** | |
* Engine | |
* |
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 | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\Reference; | |
class Engine | |
{ | |
private $cubic; | |
/** |
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
use DI\Annotations\Inject; | |
class Foo { | |
/** | |
* @Inject | |
* @var Bar | |
*/ | |
private $bar; | |
public function __construct() { |
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
class Tractor | |
{ | |
protected $engine; | |
public function setEngine($engine) | |
{ | |
$this->engine = $engine; | |
} | |
} |
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
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\Config\FileLocator; | |
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; | |
$container = new ContainerBuilder(); | |
$loader = new XmlFileLoader($container, new FileLocator(__DIR__)); | |
$loader->load('services.xml'); |
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
class PingPongThread extends Thread { | |
/** | |
* Message for print | |
*/ | |
private String message; | |
/** | |
* Main Application thread | |
*/ |
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 | |
/** | |
* Get image for video preview | |
* | |
* @param $videoId | |
* | |
* @return string | |
*/ | |
public function createVideoImage($videoId) |
OlderNewer