DrawMyAttention\ResourceGenerator\Commands\ResourceMakeCommand::convertArrayToString PHP Method

convertArrayToString() public method

Convert a PHP array into a string version.
public convertArrayToString ( $array ) : string
$array
return string
    public function convertArrayToString($array)
    {
        $string = '[';
        foreach ($array as $name => $properties) {
            $string .= '[';
            $string .= "'name' => '" . $name . "',";
            $string .= "'properties' => [";
            foreach ($properties as $property) {
                $string .= "'" . $property . "', ";
            }
            $string = rtrim($string, ', ');
            $string .= ']';
            $string .= '],';
        }
        $string = rtrim($string, ',');
        $string .= ']';
        return $string;
    }