sketchy drawing of the artist

Brief

< Projects

90% of the reason I built it was because I got very tired of writing isset(), etc, conditionals when the nonexistence of a key was equivalent to a falsey value in terms of program flow. It grew from there to provide some other functionality related to moving collections of structured data around. I find it particularly useful when templating with Laravel Blade.

You can think of it as a sort of argument wrapper:

$Args = Brief::make([
'sandwich_type' => 'Reuben',
]);

$Args->sandwich_type;
// 'Reuben'

$Args->sandwich_ingredients;
// null

$Args->sandwich_ingredients = [
'corned beef', 'cheese', 'sauerkraut', 'dressing'
];
$Args->sandwich_ingredients;
// [ 'corned beef', 'cheese', 'sauerkraut', 'dressing' ]