@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $xml = simplexml_load_file('ig-data.xml'); |
| 3 | 3 | |
| 4 | -if (isset($_POST['gram'])){ |
|
| 4 | +if (isset($_POST['gram'])) { |
|
| 5 | 5 | $xml->addChild('instagram', $_POST['gram']); |
| 6 | 6 | $xml->saveXML(); |
| 7 | 7 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | <?php |
| 62 | 62 | $i = 0; |
| 63 | 63 | $xmlData = simplexml_load_file('ig-data.xml'); |
| 64 | - $grams = array_reverse( json_decode( json_encode($xmlData->instagram) , 1)); |
|
| 64 | + $grams = array_reverse(json_decode(json_encode($xmlData->instagram), 1)); |
|
| 65 | 65 | ?> |
| 66 | 66 | </pre> |
| 67 | 67 | <?php |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | <pre> |
| 134 | 134 | <?php |
| 135 | - if ($_SERVER['HTTP_HOST'] == 'localhost' || $_SERVER['HTTP_HOST'] == '127.0.0.1'){ |
|
| 135 | + if ($_SERVER['HTTP_HOST'] == 'localhost' || $_SERVER['HTTP_HOST'] == '127.0.0.1') { |
|
| 136 | 136 | require_once('instagallery-editor.php'); |
| 137 | 137 | } |
| 138 | 138 | ?> |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * TODO: Build loop |
| 29 | 29 | */ |
| 30 | 30 | |
| 31 | - $setter = 'set'.ucfirst($key); |
|
| 31 | + $setter = 'set' . ucfirst($key); |
|
| 32 | 32 | if (is_callable([$grams, $setter])) { |
| 33 | 33 | $gram->$setter($key, $value); |
| 34 | 34 | } |
@@ -1,15 +1,15 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // Require once the Composer Autoload |
| 3 | -if (file_exists(dirname(__FILE__).'/vendor/autoload.php')) { |
|
| 4 | - require_once dirname(__FILE__).'/vendor/autoload.php'; |
|
| 3 | +if (file_exists(dirname(__FILE__) . '/vendor/autoload.php')) { |
|
| 4 | + require_once dirname(__FILE__) . '/vendor/autoload.php'; |
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | |
| 8 | -$rootDirectory = __DIR__.DIRECTORY_SEPARATOR; |
|
| 9 | -include_once $rootDirectory.'assets'.DIRECTORY_SEPARATOR.'partials'.DIRECTORY_SEPARATOR.'header.php'; |
|
| 8 | +$rootDirectory = __DIR__ . DIRECTORY_SEPARATOR; |
|
| 9 | +include_once $rootDirectory . 'assets' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'header.php'; |
|
| 10 | 10 | |
| 11 | 11 | $App = new Cowglow\InstagramGallery\Ports\App(); |
| 12 | 12 | $App->loadGrams(); |
| 13 | 13 | |
| 14 | -include_once $rootDirectory.'assets'.DIRECTORY_SEPARATOR.'partials'.DIRECTORY_SEPARATOR.'footer.php'; |
|
| 14 | +include_once $rootDirectory . 'assets' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'footer.php'; |
|
| 15 | 15 | |
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | public function __construct($params) |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | - $rootDirectory = dirname(dirname(dirname(__DIR__))).DIRECTORY_SEPARATOR; |
|
| 23 | - include_once $rootDirectory.'assets'.DIRECTORY_SEPARATOR.'partials'.DIRECTORY_SEPARATOR.'header.php'; |
|
| 24 | - include_once $rootDirectory.'assets'.DIRECTORY_SEPARATOR.'partials'.DIRECTORY_SEPARATOR.'footer.php'; |
|
| 22 | + $rootDirectory = dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR; |
|
| 23 | + include_once $rootDirectory . 'assets' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'header.php'; |
|
| 24 | + include_once $rootDirectory . 'assets' . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'footer.php'; |
|
| 25 | 25 | |
| 26 | 26 | // $grams = array_reverse($params); |
| 27 | 27 | // |
@@ -28,10 +28,10 @@ discard block |
||
| 28 | 28 | public function __construct() |
| 29 | 29 | { |
| 30 | 30 | // Initialize the Root Directory |
| 31 | - self::$rootDirectory = dirname(dirname(dirname(__DIR__))).DIRECTORY_SEPARATOR; |
|
| 31 | + self::$rootDirectory = dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR; |
|
| 32 | 32 | |
| 33 | 33 | // Initialize the configuration |
| 34 | - $filePath = self::$rootDirectory.'config'.DIRECTORY_SEPARATOR.'data.xml'; |
|
| 34 | + $filePath = self::$rootDirectory . 'config' . DIRECTORY_SEPARATOR . 'data.xml'; |
|
| 35 | 35 | $config = file_get_contents($filePath); |
| 36 | 36 | self::$config = simplexml_load_string($config); |
| 37 | 37 | } |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | return self::$config; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - $config =& self::$config; |
|
| 64 | - return $config->xpath('//'.$key); |
|
| 63 | + $config = & self::$config; |
|
| 64 | + return $config->xpath('//' . $key); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | } |
| 68 | 68 | \ No newline at end of file |