PHP
22
Вклад в тег
array_walk($guide['postInGuides'], function (&$postInGuide, $key) use ($guide, $viewRenderer) {
$postInGuide['post']['url'] = [
'read' => $viewRenderer->url('guide/guide/post', [
'slugGuide' => $guide['name'],
'slugPost' => $postInGuide['post']['slug'],
]),
'update' => $viewRenderer->url('post/post/action', [
'slugPost' => $postInGuide['post']['slug'],
'action' => 'update',
]),
'delete' => $viewRenderer->url('post/post/action', [
'slugPost' => $postInGuide['post']['slug'],
'action' => 'delete',
]),
];
});
"autoload": {
"psr-4": {
"Application\\": "module/Application/src/",
"Vendor\\Namespace\\": ""
},
"psr-0": {
"Monolog": "src/",
"Vendor\\Namespace": ["src/", "lib/"],
"Pear_Style": "src/",
"": "src/"
},
"classmap": ["src/", "lib/", "Something.php"],
"files": ["src/MyLibrary/functions.php"]
},
"config": {
"optimize-autoloader": true
},
$ php composer.phar dump-autoload --optimize
$var = false;
unset($var);
echo isset($var) ? $var : 'no exist';
echo $var? $var : 'no exist';