for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Adlogix package.
*
* (c) Allan Segebarth <[email protected]>
* (c) Jean-Jacques Courtens <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Adlogix\Zf2Rollout\View\Helper;
use Zend\View\Helper\AbstractHelper;
/**
* Returns the description of a given feature.
* @package Adlogix\Zf2Rollout\View\Helper
* @author Laurent De Coninck <[email protected]>
class Description extends AbstractHelper
{
* @var array
private $features;
public function __construct(array $features = [])
$this->features = $features;
}
* Returns the description of a feature.
* @param string $feature
* @return string|null
public function __invoke($feature)
if (!isset($this->features[$feature]['description'])) {
return '';
return $this->features[$feature]['description'];