Creates a new cache item and sets the properties from the given array.

@param array $entry Associative list of name and value properties using the "cache" prefix
@return MAdmin_Cache_Item_Interface Cache item
481691
protected function _createItem( array $entry )
	{
		$item = $this->_manager->createItem();

		foreach( $entry as $name => $value )
		{
			switch( $name )
			{
				case 'cache.id': $item->setId( $value ); break;
				case 'cache.value': $item->setValue( $value ); break;
				case 'cache.tags': $item->setTags( (array) $value ); break;
				case 'cache.expire':
					if( $value != '' )
					{
						$value = str_replace( 'T', ' ', $value );
						$entry->{'cache.expire'} = $value;
						$item->setTimeExpire( $value );
					}
					break;
			}
		}

		return $item;
	}
960496
public function add($entry, $push=false)
    {
        if ( $push ) {
            array_unshift($this->menu, $entry);
        } else {
            $this->menu[] = $entry;
        }
        return $this;
    }
973396
public function addEntry(MenuEntry $entry)
    {
        if ($this->prepared) {
            throw new \RuntimeException('MenuGroup has been prepared and can\'t receive new entries.');
        }
        $this->entries[] = $entry;

        return $this;
    }
434103
public function getSectionOfEntry( $entry )
	{
		foreach( $this->getSections() as $section )
			if( in_array( $entry, $this->list[$section] ) )
				return $section;
		throw new InvalidArgumentException( 'Entry "'.$entry.'" not found in any Section.' );
	}
749493
public function add(array $entry)
    {
        if (!isset($entry['msgid'])) {
            throw new Exception("Invalid entry: missing msgid");
        }
        $id = $entry['msgid'];
        $plural_id = isset($entry['msgid_plural']) ? $entry['msgid_plural'] : null;
        $context = isset($entry['msgctxt']) ? $entry['msgctxt'] : null;
        $flags = isset($entry['flags']) ? $entry['flags'] : array();

        $strings = array();
        foreach ($entry as $key => $value) {
            if (substr($key, 0, 6) === 'msgstr') {
                if (is_array($value)) {
                    $strings = array_merge($strings, $value);
                } else {
                    $strings[] = $value;
                }
            }
        }
        if (count($strings) === 0) {
            throw new Exception("Invalid entry: missing msgstr");
        }
        $this->set[] = array(
            'id' => $id,
            'plural' => $plural_id,
            'context' => $context,
            'flags' => $flags,
            'strings' => $strings
        );
    }
442494
public function addEntry(GiveawayParticipantEntry $entry)
    {
        if ($this->entries->contains($entry) === false) {
            $entry->setParticipant($this);
            $this->entries->add($entry);
        }

        return $this;
    }
1043734
private function addHistoryEntry($entry)
	{
		if($entry != null)
		{
			if($this->history == null)
				$this->history = array();
			$this->history[] = $entry;
		}
	}
1062979
public static function storeEntry(Entry $entry): DbEntry
    {
        $dbEntry = new static;
        $dbEntry->channel = $entry->channel();
        $dbEntry->level = $entry->level();
        $dbEntry->message = $entry->message();
        $dbEntry->context = $entry->context();
        $dbEntry->save();
        return $dbEntry;
    }
612101
public function createKeyFromEntry(PoEntry $entry): string
    {
        return $this->createKey(
            $entry->getAsString(PoTokens::MESSAGE),
            $entry->getAsString(PoTokens::CONTEXT),
            $entry->getAsString(PoTokens::PLURAL)
        );
    }
53668
public function add_entry_or_merge($entry)
    {
        if (is_array($entry)) {
            $entry = new EntryTranslations($entry);
        }
        $key = $entry->key();
        if (false === $key) {
            return false;
        }
        if (isset($this->entries[$key])) {
            $this->entries[$key]->merge_with($entry);
        } else {
            $this->entries[$key] = &$entry;
        }

        return true;
    }
223008
public function reprioritise($entry, $newPriority, $oldPriority = false)
    {
        $changedAnything = false;
        foreach ($this->entries as $i => &$entryData) {
            if ($entry === $entryData['data'] && ($oldPriority === false || $entryData['priority'] == $oldPriority)) {
                $entryData['priority'] = $newPriority;
                $changedAnything = true;
            }
        }
        if ($changedAnything) {
            $this->sorted = false;
        }
        return $this;
    }
18716
public function loadFromArray(array $entries)
     {
         foreach ($entries as $var=>$val) {
             switch ($var) {
                case 'name': $this->setName($val); break;
                case 'version': $this->setVersion($val); break;
                case 'relative_path': $this->setRelativePath($val); break;
                case 'assets_path':
                case 'path':
                    $this->setAssetsPath($val); break;
                case 'assets_presets': $this->setAssetsPresets($val); break;
            }
         }
         return $this;
     }
414970
public static function fromRawEntry($entry)
	{
		$className = get_called_class();
		$class = new $className();

		foreach ($entry as $property=> $value)
			$class->{$property} = $value;

		return $class;
	}
497604
protected function createEntry()
    {
        $entry = new Entry();
        $entry->setVisible(false)
              ->setName($this->name);
        $this->setEntry($entry);
        return $entry;
    }
655700
protected function _createItem( array $entry )
	{
		$item = $this->_manager->createItem();

		foreach( $entry as $name => $value )
		{
			switch( $name )
			{
				case 'order.base.product.id': $item->setId( $value ); break;
				case 'order.base.product.type': $item->setType( $value ); break;
				case 'order.base.product.baseid': $item->setBaseId( $value ); break;
				case 'order.base.product.orderproductid': $item->setOrderProductId( $value ); break;
				case 'order.base.product.suppliercode': $item->setSupplierCode( $value ); break;
				case 'order.base.product.prodcode': $item->setProductCode( $value ); break;
				case 'order.base.product.quantity': $item->setQuantity( $value ); break;
				case 'order.base.product.name': $item->setName( $value ); break;
				case 'order.base.product.flags': $item->setFlags( $value ); break;
				case 'order.base.product.status': $item->setStatus( $value ); break;
				case 'order.base.product.position': $item->setPosition( $value ); break;
			}
		}

		return $item;
	}
1040540
public function characteristicsUpdateItem($entry) {
    $update = $this->connection->update('site_commerce_characteristics_item')
      ->fields($entry)
      ->condition('cid', $entry['cid']);
    return $update->execute();
  }
1255220
public function walkArrayEntry($entry, Type $entryType, $key, Array $array, Type $arrayType) {
    $walkedEntry = $this->walk($entry, $entryType); // demo zwecke (wir vergessen hier was mit key zu machen)
    return $this->decorateArrayEntry($walkedEntry, $key);
  }