configuration['delimiter'])) { throw new MigrateException('delimiter is empty'); } $strict = array_key_exists('strict', $this->configuration) ? $this->configuration['strict'] : TRUE; if ($strict && !is_string($value)) { throw new MigrateException(sprintf('%s is not a string', var_export($value, TRUE))); } elseif (!$strict) { // Check if the incoming value can cast to a string. $original = $value; if (!is_string($original) && ($original != ($value = @strval($value)))) { throw new MigrateException(sprintf('%s cannot be casted to a string', var_export($original, TRUE))); } // Empty strings should be exploded to empty arrays. if ($value === '') { return []; } } $limit = isset($this->configuration['limit']) ? $this->configuration['limit'] : PHP_INT_MAX; return explode($this->configuration['delimiter'], $value, $limit); } /** * {@inheritdoc} */ public function multiple() { return TRUE; } }