Adds an entry.

@param MenuEntry $entry
@throws \RuntimeException
@return MenuGroup
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;
    }
1259978
public function addEntry($entry)
	{
		// Set some default field values if not already set.
		$date = new AnDate();

		if (!isset ($entry['date'])) {
			$entry['date'] = $date->format("%Y-%m-%d");
		}

		if (!isset ($entry['time'])) {
			$entry['time'] = $date->format("%H:%M:%S");
		}

		if (!isset ($entry['c-ip'])) {
			$entry['c-ip'] = $_SERVER['REMOTE_ADDR'];
		}

		// Ensure that the log entry keys are all uppercase
		$entry = array_change_key_case($entry, CASE_UPPER);

		// Find all fields in the format string
		$fields = array ();
		$regex = "/{(.*?)}/i";
		preg_match_all($regex, $this->_format, $fields);

		// Fill in the field data
		$line = $this->_format;

		for ($i = 0; $i < count($fields[0]); $i++) {
			$line = str_replace($fields[0][$i], (isset ($entry[$fields[1][$i]])) ? $entry[$fields[1][$i]] : "-", $line);
		}

		// Write the log entry line
		if ($this->_openLog()) {
            return fputs($this->_file, "\n" . $line) ? true : false;
		}

        return false;
	}
187682
public function addEntryWith(\hemio\html\Interface_\HtmlCode $withEntry)
    {
        $li = new \hemio\html\Li();
        $li->addChild($withEntry);
        return $this->addChild($li);
    }
392597
public function setEntry(Entry $entry)
    {
        $entry->setScriptEvents(true)
              ->checkId();
        $this->entry = $entry;
        return $this;
    }
864567
public function addLog(array $entry)
    {
        $this->log[] = $entry;

        if ($this->observer) {
            call_user_func($this->observer, $entry);
        }
    }
1088013
public function addCurrentChildren()
    {
        foreach ($this->menu->getCurrentChildren() as $menuItem) {
            $this->addMenuItem($menuItem);
        }
        return $this;
    }
334139
public function searchMenuEntryForKey($menuEntries, $key)
    {
        foreach ($menuEntries as $menuEntry) {
            if ($menuEntry->getKey() === $key) {
                return $menuEntry;
            } 
            
            if ($menuEntry->hasChildren()) {
                $result = $this->searchMenuEntryForKey($menuEntry->getChildren(), $key);
                
                if ($result !== false) {
                    return $result;
                }
            }
        }
        
        return false;
    }
1137102
private function sendEntry(Entry $entry)
    {
        if ($this->batchEnabled) {
            $this->batchRunner->submitItem($this->identifier, $entry);
            return;
        }

        $this->logger->write($entry);
    }
863133
public function addEntry(
        $token,
        $event,
        $uniqueId,
        $type,
        DateTime $dateTime
    ) {
        $entry = $this
            ->entryFactory
            ->create(
                $token,
                $event,
                $uniqueId,
                $type,
                $dateTime
            );

        $this->entryObjectManager->persist($entry);
        $this->entryObjectManager->flush($entry);

        $this
            ->metricsBucket
            ->add($entry);

        return $this;
    }
123543
protected function newLogEntry(
        /*# string */ $channel,
        /*# string */ $level,
        /*# string */ $message,
        array $context = []
    )/*# : EventInterface */ {
        if (is_null($this->entry_proto)) {
            return new LogEntry($channel, $level, $message, $context);
        } else {
            $entry = clone $this->entry_proto;
            return $entry
                ->setChannel($channel)
                ->setLevel($level)
                ->setMessage($message)
                ->setContext($context)
                ->setTimestamp();
        }
    }
715333
private function addGroup(MenuGroup $group)
    {
        if (!$this->hasGroup($group->getName())) {
            $this->groups[$group->getName()] = $group;
        }
    }
87636
protected function addFile(array $entry)
	{
		// add the new file object to the container
		$this->container[] = new File($entry, $this->callbacks);

		// and load it with a default config
		end($this->container)->setConfig($this->defaults);
	}
1321884
public function add($dn, array $entry)
    {
        if ($this->suppressErrors) {
            return @ldap_add($this->getConnection(), $dn, $entry);
        }

        return ldap_add($this->getConnection(), $dn, $entry);
    }
1113811
def add(self, name, desc, func=None, args=None, krgs=None):
        """"""
        self.entries.append(MenuEntry(name, desc, func, args or [], krgs or {}))
387224
protected function addDirectiveToEntry($key, $value, LdifEntryInterface $entry)
    {
        if ($entry instanceof LdifEntryAdd) {
            $entry->addAttribute($key, $value);
        } elseif ($entry instanceof LdifEntryModDn) {
            $this->addModDnDirective($entry, $key, $value);
        } elseif ($entry instanceof LdifEntryModify) {
            $this->addModifyDirective($entry, $key, $value);
        }
    }
1325620
public function addMenuItem(MenuEvent $e)
    {
        $array = $e->getMenuConfig();

        $this->menu->addChild(
            $this->factory->createItem($array['name'], $array)
        );
    }
1343444
public function insertGroup(Group $group)
    {
        try {
            return $this->innerGateway->insertGroup($group);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }