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 Foo | |
{ | |
private $_property = "Foo"; | |
public function get() | |
{ | |
return $this->_property; | |
} |
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
session.use_trans_sid = 0 | |
session.use_cookies = 1 | |
session.use_only_cookies = 1 |
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 | |
$path = "http://sznapka.pl/myarchive.gz"; | |
$data = file_get_contents("compress.zlib://" . $path); | |
printf("Got from %s archive such content:\n%s", $path, trim($data)); | |
// prints: | |
// Got from http://sznapka.pl/myarchive.gz archive such content: | |
// Hi, I'm gz-ipped and you can ungzip me and download on the fly :-) |
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 | |
foreach (range(1,5) as $value) { | |
if ($value == 2) | |
continue | |
print "$value\n"; | |
} |
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 | |
$guys[] = "Robert, age 24"; | |
$guys[] = "Alice, age 19"; | |
$guys[] = "Jacob, age 29"; | |
array_walk($guys, function (&$guy) { | |
$guy = preg_replace_callback("#^\w{2}\w+#", function($value) { | |
$value = current($value); | |
for ($i = 2; $i < strlen($value); $i++) { |
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
<?xml version="1.0"?> | |
<AfasGetConnector> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="AfasGetConnector"> | |
<xs:complexType> | |
<xs:choice maxOccurs="unbounded"> | |
<xs:element name="GetOpenAmounts"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="Subnummer" type="xs:string" minOccurs="0"/> |
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
<?xml version="1.0"?> | |
<AfasGetConnector> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="AfasGetConnector"> | |
<xs:complexType> | |
<xs:choice maxOccurs="unbounded"> | |
<xs:element name="GetMatchedPayments"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="Subnummer" type="xs:string" minOccurs="0"/> |
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
#!/bin/bash | |
USER=`whoami` | |
CURRENT=${PWD##*/} | |
echo ">> Searching for $CURRENT" | |
BUNDLE=`grep $CURRENT /tmp/bundles_$USER/felix-cache -rin | head -1 | awk -F "/" '{print $5}'` | |
echo ">> Found bundle $BUNDLE" | |
TARGET=`find . -name *.jar` |
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
<VirtualHost *:80> | |
VirtualDocumentRoot "/var/www/%1/web/" | |
<Directory "/var/www/%0/web"> | |
AllowOverride All | |
Allow from All | |
</Directory> | |
</VirtualHost> |
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(__DIR__ . "/../../../../app/AppKernel.php"); | |
class BaseTestCase extends \PHPUnit_Framework_TestCase | |
{ | |
protected $_container; | |
public function __construct() | |
{ |