for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Anomaly\ConfigurationModule\Configuration\Command;
use Anomaly\ConfigurationModule\Configuration\Contract\ConfigurationInterface;
use Anomaly\Streams\Platform\Addon\FieldType\FieldType;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Foundation\Bus\DispatchesJobs;
/**
* Class GetValuePresenter
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <[email protected]>
* @author Ryan Thompson <[email protected]>
*/
class GetValuePresenter
{
use DispatchesJobs;
* The configuration instance.
* @var ConfigurationInterface
protected $configuration;
* Create a new GetValuePresenter instance.
* @param ConfigurationInterface $configuration
public function __construct(ConfigurationInterface $configuration)
$this->configuration = $configuration;
}
* Handle the command.
* @return \Anomaly\Streams\Platform\Addon\FieldType\FieldTypePresenter|mixed|object
public function handle()
/* @var FieldType $type */
if ($type = $this->dispatch(new GetValueFieldType($this->configuration))) {
return $type->getPresenter();
return array_get($this->configuration->getAttributes(), 'value');