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 flattenArray( array $array ) | |
{ | |
$returned_array = array(); | |
foreach( new \RecursiveIteratorIterator( new \RecursiveArrayIterator($array) ) as $key => $value ) | |
{ | |
$returned_array[] = $value; | |
} |
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 | |
$file = 'data.csv'; | |
try { | |
$csv = new SplFileObject($file, 'r'); | |
} catch (RuntimeException $e) { | |
printf("Error opening .csv: %s\n", $e->getMessage()); | |
} |
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 | |
// Service Provider | |
$app->register(new Via\Content\ContentServiceProvider()); | |
// Route | |
$app->get('/{id}', function(Doctrine\DBAL\Connection $db) use ($app) { | |
return $app['content.id_checker']($db); | |
}); | |
// and in .... ContentServiceProvider |
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" encoding="UTF-8"?> | |
<project name="test" default="test"> | |
<property name="dir" value="../test_directory" /> | |
<target name="test"> | |
<echo message="Test 1:" /> | |
<echo message="--------------------" /> |
NewerOlder