Use OptionsBuilder in all mapper classes.

This commit is contained in:
David Molineus
2015-01-22 09:02:14 +01:00
parent b96cd80669
commit 52440c35dd
15 changed files with 14 additions and 99 deletions

View File

@@ -56,90 +56,6 @@ abstract class AbstractMapper implements Mapper
$this->initialize();
}
/**
* Add a option mapping.
*
* @param string $option Name of the option.
* @param string $mapping Mapping column name. Set if column name differs.
*
* @return $this
*/
public function addOption($option, $mapping = null)
{
trigger_error(
__METHOD__ . ' is deprecated. Use $this->optionsBuilder->' . __FUNCTION__ . '()',
E_USER_DEPRECATED
);
$this->optionsBuilder->addOption($option, $mapping);
return $this;
}
/**
* Add options mapping.
*
* @param array|mixed $options List of option names.
*
* @return $this
*/
public function addOptions($options)
{
trigger_error(
__METHOD__ . ' is deprecated. Use $this->optionsBuilder->' . __FUNCTION__ . '()',
E_USER_DEPRECATED
);
$arguments = func_get_args();
$this->optionsBuilder->addOptions($arguments);
return $this;
}
/**
* Add a conditional option.
*
* @param string $column Condition column.
* @param string $option Option name.
* @param null $mapping Mapping column name.
* @param mixed $value Value of the conditional column.
*
* @return $this
*/
public function addConditionalOption($column, $option = null, $mapping = null, $value = self::VALUE_NOT_EMPTY)
{
trigger_error(
__METHOD__ . ' is deprecated. Use $this->optionsBuilder->' . __FUNCTION__ . '()',
E_USER_DEPRECATED
);
$this->optionsBuilder->addConditionalOption($column, $option, $mapping, $value);
return $this;
}
/**
* Add a conditional options.
*
* @param string $column Condition column.
* @param array $options Option names.
* @param mixed $value Value of the conditional column.
*
* @return $this
*/
public function addConditionalOptions($column, array $options, $value = self::VALUE_NOT_EMPTY)
{
trigger_error(
__METHOD__ . ' is deprecated. Use $this->optionsBuilder->' . __FUNCTION__ . '()',
E_USER_DEPRECATED
);
$this->optionsBuilder->addConditionalOptions($column, $options, $value);
return $this;
}
/**
* {@inheritdoc}
*/