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 | |
namespace App\Libraries; | |
/** | |
* Class able to convert a flat array with parent ID's to a nested tree | |
*/ | |
class FlatToTreeConverter | |
{ | |
/** |
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
#!/usr/bin/env bash | |
# see http://symfony.com/doc/3.4/setup/file_permissions.html | |
function show_help | |
{ | |
# General help text | |
cat << EOF | |
Script for Setting up or Fixing File Permissions for Symfony applications | |
Usage: sfperm <option> |
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 | |
/************************************************************************** | |
repairSerializedArray() | |
-------------------------------------------------------------------------- | |
Extract what remains from an unintentionally truncated serialized string | |
Example Usage: | |
// the native unserialize() function returns false on failure | |
$data = @unserialize($serialized); // @ silences the default PHP failure notice |