Files
Phraseanet/lib/Alchemy/Phrasea/Media/Subdef/Provider.php
2014-01-06 15:28:12 +01:00

55 lines
1.0 KiB
PHP

<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2014 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Alchemy\Phrasea\Media\Subdef;
/**
*
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
abstract class Provider implements Subdef
{
protected $options = array();
protected $spec;
public function registerOption(OptionType\OptionType $option)
{
$this->options[$option->getName()] = $option;
return $this;
}
public function unregisterOption($name)
{
unset($this->options[$name]);
return $this;
}
public function getOptions()
{
return $this->options;
}
public function getOption($name)
{
return $this->options[$name];
}
public function setOptionValue($name, $value)
{
$this->options[$name]->setValue($value);
return $this;
}
}