shiftpi/CountryFlags

View on GitHub
src/ShiftpiCountryFlags/Options/ModuleOptions.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace ShiftpiCountryFlags\Options;

use Zend\Stdlib\AbstractOptions;

/**
 * Options from config file
 * @author Andreas Rutz <andreas.rutz@posteo.de>
 * @license MIT
 */
class ModuleOptions extends AbstractOptions
{
    /** @var string */
    protected $mapper;

    /** @var string */
    protected $dataPath;

    /**
     * @param string $mapper
     */
    public function setMapper($mapper)
    {
        $this->mapper = $mapper;
    }

    /**
     * @return string
     */
    public function getMapper()
    {
        return $this->mapper;
    }

    /**
     * @param string $dataPath
     */
    public function setDataPath($dataPath)
    {
        $this->dataPath = $dataPath;
    }

    /**
     * @return string
     */
    public function getDataPath()
    {
        if ($this->dataPath === null) {
            return __DIR__ . '/../../../data/flags';
        }

        return $this->dataPath;
    }
}