Adds a single translationTable to collection of translationTables.

@param string $key The key/index to remove

@author Benjamin Carl <opensource@clickalicious.de>
554905
protected function removeTranslationTable($key)
    {
        if (true === isset(self::$translationTables[$key])) {
            unset(self::$translationTables[$key]);
        }
    }
218739
public function addTranslation(\Lexik\Bundle\TranslationBundle\Model\Translation $translation)
    {
        $translation->setFile($this);

        $this->translations[] = $translation;
    }
888825
public function addItemKey(string $table, array $key): self
    {
        $this->queue[] = ['table' => $table, 'key' => $key];
        return $this;
    }
381503
protected function guardAgainstNonTranslatableAttribute($key)
    {
        if ( ! $this->isTranslatableAttribute($key)) {
            throw UntranslatableAttributeException::make($key, $this->getTranslatableAttributes());
        }
    }
500503
public function offsetUnset($key)
    {
        unset($this->bindings[$key], $this->instances[$key], $this->resolved[$key]);
    }
930623
public function add($key) : void
    {
        Assert::isInstanceOf($key, Key::class);
        parent::add($key);
    }
1179507
public function offsetUnset($key)
    {
        $keys = $this->parseKey($key);
        $array = &$this->values;

        while (count($keys) > 1) {
            $key = array_shift($keys);

            if (!isset($array[$key]) || !is_array($array[$key])) {
                return;
            }

            $array =& $array[$key];
        }

        unset($array[array_shift($keys)]);
    }
1207959
protected function setKey($type, $key)
    {
        if (!in_array(null, $this->tables))
        {
            Validate::table($this->tables[$type])->field($key);

            $this->keys[$type] = $key;
            return $this;
        }

        throw new LazerException('First you must define tables name');
    }
1367512
public function setTranslations($key, array $translations)
    {
        $this->guardAgainstNonTranslatableAttribute($key);

        foreach ($translations as $locale => $translation) {
            $this->setTranslation($key, $locale, $translation);
        }

        return $this;
    }
1207313
public function addTranslation(TranslationInterface $translation)
    {
        if (!$this->translations->containsKey($translation->getLocale())) {
            $this->translations->set($translation->getLocale(), $translation);
            $translation->setTranslatable($this);
        }

        return $this;
    }
459915
protected function lru($key)
    {
        // move key that has just been used to last position in the array
        $value = $this->items[$key];
        unset($this->items[$key]);
        $this->items[$key] = $value;
    }
1349831
public function setTranslationsForKey(array $messages, $key)
    {
        foreach ($messages as $language => $value) {
            $this->setTranslation($key, $value, $language);
        }
    }
146285
public function remove($key) {
        $key = $this->formatKey($key);
        array_remove($this->headers, $key);
    }
1170055
static function storeCache( $key )
    {
        $translationCache = eZTranslationCache::cacheTable();
        if ( !isset( $translationCache[$key] ) )
        {
            eZDebug::writeWarning( "Translation cache for key '$key' does not exist, cannot store cache", __METHOD__ );
            return;
        }
        $internalCharset = eZTextCodec::internalCharset();
//         $cacheFileKey = "$key-$internalCharset";
        $cacheFileKey = $key;
        $cacheFileName = md5( $cacheFileKey ) . '.php';

        $cache =& $translationCache[$key];

        if ( !file_exists( eZTranslationCache::cacheDirectory() ) )
        {
            eZDir::mkdir( eZTranslationCache::cacheDirectory(), false, true );
        }
        $php = new eZPHPCreator( eZTranslationCache::cacheDirectory(), $cacheFileName );
        $php->addRawVariable( 'eZTranslationCacheCodeDate', self::CODE_DATE );
        $php->addSpace();
        $php->addRawVariable( 'CacheInfo', array( 'charset' => $internalCharset ) );
        $php->addRawVariable( 'TranslationInfo', $cache['info'] );
        $php->addSpace();
        $php->addRawVariable( 'TranslationRoot', $cache['root'] );
        $php->store( true );
    }
1089922
public function add($element, $key = null)
    {
        if ($key == null) {
            $this->items[] = $element;

            return;
        }
        $this->set($key, $element);
    }
1157605
public function addTranslation($locale, $group, $key)
    {
        if(!\Config::get('app.debug') || \Config::get('translation-db.minimal')) return;

        // Extract the real key from the translation.
        if (preg_match("/^{$group}\.(.*?)$/sm", $key, $match)) {
            $name = $match[1];
        } else {
            throw new TranslationException('Could not extract key from translation.');
        }

        $item = \DB::table('translations')
            ->where('locale', $locale)
            ->where('group', $group)
            ->where('name', $name)->first();

        $data = compact('locale', 'group', 'name');
        $data = array_merge($data, [
            'viewed_at' => date_create(),
            'updated_at' => date_create(),
        ]);

        if($item === null) {
            $data = array_merge($data, [
                'created_at' => date_create(),
            ]);
            \DB::table('translations')->insert($data);
        } else {
            if($this->_app['config']->get('translation-db.update_viewed_at')) {
                \DB::table('translations')->where('id', $item->id)->update($data);
            }
        }
    }
960814
public function offsetUnset($key)
    {
        $keyString = self::keyString($key);
        if (($index = $this->keysIndices[$keyString] ?? null) !== null) {
            unset($this->keys[$index], $this->values[$index], $this->keysIndices[$keyString]);
        }
    }