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 | |
$array[0]["name"]="test"; | |
$array[0]["datum"]="10.1.2010"; | |
$array[1]["name"]="test1"; | |
$array[1]["datum"]="10.1.2009"; | |
$array[2]["name"]="test2"; | |
$array[2]["datum"]="10.1.2011"; | |
function my_sort($itemA, $itemB) { |
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 error { | |
public $title; | |
public $code; | |
public $contains = array(); | |
public function __construct($title, $code = 0, Array $contains = array()) { | |
$this->title = $title; | |
$this->code = $code; |
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
; log_errors | |
; Default Value: Off | |
; Development Value: On | |
; Production Value: On |
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
1. dfkadsjfsdfdsf | |
2. dsflkajsdlkfjads | |
3. asdlkfjlaksdfj | |
4. adsfklajasdlkfj | |
5. dsafkjadlskf | |
6. sdflkjadsf | |
7. adsfkljdsfdsfas | |
8. sadfkljadslkfj | |
9. adsfkjdslkf | |
10. dsfjasdöf |
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
<h1>Parent Template</h1> | |
<p><?php echo $content ?></p> | |
<?php print $this->block('footer') ?> |
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 generateEmail() { | |
$nameLength = rand(5, 9); | |
$name = ''; | |
for($x = 0; $x < $nameLength; $x++) { | |
$name .= chr(rand(97, 122)); | |
} | |
$domainLength = rand(3, 9); |
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
- (NSString *)signatureBaseStringForMethod:(NSString *)aMethod | |
url:(NSURL *)aURL | |
parameters:(NSDictionary *)aParameterDict { | |
NSMutableDictionary *parameters = [aParameterDict mutableCopy]; | |
if ([aURL query]) { | |
NSArray *parameterItems = [[aURL query] componentsSeparatedByString:@"&"]; | |
for(NSString *parameterItem in parameterItems) { | |
NSMutableArray *parameterItemParts = (NSMutableArray *)[parameterItem componentsSeparatedByString:@"="]; |
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 | |
interface Validator { | |
function validate($value, Error &$error = null); | |
} | |
class ValidatorA implements Validator {} | |
class ValidatorB implements Validator {} | |
class SimpleObject { | |
function foo($baz) { |
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 | |
$obj1 = new Object1(); | |
$obj2 = new Object2(); | |
$errors = null; | |
if($obj1->validate($value, $error)) { | |
echo "fehler1"; | |
} |
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 | |
public function validateName($value) { | |
$collection = new ErrorCollection; | |
$error = ValidatorA::validate($value); | |
if($error) { | |
$collection->addError($error); | |
} |