Return the Sections of an entry if available.
@access		public
@param		string		$entry			Entry to get Section for
@return		string
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.' );
	}
1141423
private function formatRecords(array $entry)
    {
        $entries = str_split($entry['formatted'], self::EVENT_SIZE_LIMIT);
        $timestamp = $entry['datetime']->format('U.u') * 1000;
        $records = [];

        foreach ($entries as $entry) {
            $records[] = [
                'message' => $entry,
                'timestamp' => $timestamp
            ];
        }

        return $records;
    }
12064
protected function getEntryPath(array $entry)
    {
        $path = '';

        foreach ($entry['path_collection']['entries'] as $folder) {
            if ($folder['id'] == self::ROOT_DIR_ID) {
                continue;
            }

            $path .= $folder['name'] . '/';
        }

        $path .= $entry['name'];

        return $path;
    }
968509
public function getNextPlayableGame($entry = null)
    {
        $sortedPlayableGames = $this->getPlayableGames($entry);

        return (count($sortedPlayableGames) >= 1)?current($sortedPlayableGames)->getGame():null;
    }
839825
public function getEntry($entryId) {
        list($entryId, $len) = $this->gotoEntry($entryId);
        if ($entryId === false) {
            return '';
        }
        return $this->getFile()->fread($len);
    }
875421
public function getSection($section)
    {
        if (!array_key_exists($section, $this->config)) {
            return null;
        }

        return $this->config[$section];
    }
288528
public function clean(array $entry)
	{
		$entry['id'] = $entry['dn'];
		$entry['remember_token'] = $entry['dn'];
		$entry['username'] = $entry['samaccountname'][0];

		// Default user type (ACL: 0 = admin, 1 = user)
		$entry['type'] = 1;
		$entry['group'] = '';

		// Group based view access check
		if(count($this->config['groups']) > 0)
		{
			$entry['type'] = NULL;
		}

		foreach ($this->config['groups'] as $group) 
		{
			$cn = 'CN='.$group.','.$this->config['groupdn'];
			if (isset($entry['dn']) 
				&& $this->checkGroup($entry['dn'], $cn))
			{
				$entry['type'] = 1;
				$entry['group'] = $group;
			}
		}
		
		// Admin Group Check
		foreach ($this->config['admin_groups'] as $group) 
		{
			$cn = 'CN='.$group.','.$this->config['groupdn'];
			if (isset($entry['dn']) 
				&& $this->checkGroup($entry['dn'], $cn))
			{
				$entry['type'] = 0;
				$entry['group'] = $group;
			}
		}

		// Admin/Owner Check (individual user owner/admins)
		foreach ($this->config['owners'] as $owner) 
		{
			if (isset($entry['samaccountname']) 
				&& $entry['samaccountname'][0] == $owner)
			{
				$entry['type'] = 0;
				$entry['group'] = '';
			}
		}

		// If View Groups exist and User is not in group
		if($entry['type'] === NULL)
			return NULL;

		$this->model = new GenericUser( $entry );

		return $this->model;
	}
962639
protected function getSections($type = null)
    {
        if (!$type) {
            return $this->section;
        }
        $types = null;
        switch ($type) {
            case self::SECTION_ATTACHMENTS:
                $types = TypeAttachments::get();
                break;
            case self::SECTION_BODY:
                $types = TypeBody::get();
                break;
            default:
                throw new ImapClientException('Section type not recognised/supported');
                break;
        }
        $sections = array();
        foreach ($this->section as $section) {
            $obj = $this->getSectionStructure($section);
            if (!isset($obj->subtype)) {
                continue;
            }
            if (in_array($obj->subtype, $types, false)) {
                $sections[] = $section;
            }
        }

        return $sections;
    }
1115507
public function getSection($entity)
    {
        if (!$this->hasSection($entity)) {
            throw new ConfigurationException(sprintf('Section for entity "%s" does not exist.', $entity));
        }

        return $this->sectionByEntities[$entity];
    }
1324630
private function getPartsFromSegment(string $segment): array
    {
        $parts = explode(DIRECTORY_SEPARATOR, $segment);

        return array_filter($parts, function ($part) {
            return $this->isNotEmpty($part);
        });
    }
171973
public function getResource(string $name, string $entry = null)
    {
        return $this->get('resources', $name, $entry);
    }
497333
public function deleteEntry($Entry)
    {
        if ($this->Using === 'APCu') {
            if (apcu_delete($Entry)) {
                return $this->Modified = true;
            }
            return false;
        }
        if ($this->Using === 'Memcached' || $this->Using === 'Redis') {
            if ($this->WorkingData->delete($Entry)) {
                return $this->Modified = true;
            }
            return false;
        }
        if ($this->Using === 'PDO') {
            $PDO = $this->WorkingData->prepare(self::deleteQuery);
            if ($PDO !== false && $PDO->execute(['key' => $Entry])) {
                return ($PDO->rowCount() > 0 && $this->Modified = true);
            }
            return false;
        }
        if (is_array($this->WorkingData)) {
            if (isset($this->WorkingData[$Entry])) {
                unset($this->WorkingData[$Entry]);
                return $this->Modified = true;
            }
        }
        return false;
    }
625448
public function getSectionByName($name)
    {
        foreach ($this->sections as $i => $sec) {
            if ($sec instanceof Section) {
                if ($sec->getName() == $name) {
                    return $sec;
                }
            }
        }
        return null;
    }
221222
public function getPlayableGames($entry = null)
    {
        $sortedPlayableGames = array();
        foreach ($this->missionGames as $missionGame) {
            $g = $missionGame->getGame();
            
            if ($g->isStarted() && $g->getActive()) {
                if (!$missionGame->getConditions() || $missionGame->fulfillConditions($entry)) {
                    $sortedPlayableGames[$missionGame->getPosition()] = $missionGame;
                }
            }
        }

        return $sortedPlayableGames;
    }
710644
function _stripDelimiter($entry)
    {
        $beginningdels = array_keys($this->_delimiters);
        $length = strlen($entry);
        $firstchar = substr($entry, 0, 1);
        $lastchar = substr($entry, -1, 1);
        while (in_array($firstchar, $beginningdels)) { //The first character is an opening delimiter
            if ($lastchar == $this->_delimiters[$firstchar]) { //Matches to closing Delimiter
                $entry = substr($entry, 1, -1);
            } else {
                break;
            }
            $firstchar = substr($entry, 0, 1);
            $lastchar = substr($entry, -1, 1);
        }
        return $entry;
    }
995425
public function get_section_name($section) {
        $section = $this->get_section($section);
        if ((string)$section->name !== '') {
            // Return the name the user set.
            return format_string($section->name, true, array('context' => context_course::instance($this->courseid)));
        } else {
            return $this->get_default_section_name($section);
        }
    }
805011
protected function transformValues( \stdClass $entry )
	{
		if( isset( $entry->{'text.languageid'} ) && $entry->{'text.languageid'} === '' ) {
			$entry->{'text.languageid'} = null;
		}

		if( isset( $entry->{'text.content'} ) ) {
			$entry->{'text.content'} = trim( preg_replace( '/(<br>|\r|\n)+$/', '', $entry->{'text.content'} ) );
		}

		if( isset( $entry->{'text.label'} ) ) {
			$entry->{'text.label'} = trim( preg_replace( '/(<br>|\r|\n)+$/', '', $entry->{'text.label'} ) );
		} else if( isset( $entry->{'text.content'} ) ) {
			$entry->{'text.label'} = mb_strcut( trim( preg_replace( '/(<br>|\r|\n)+/', ' ', $entry->{'text.content'} ) ), 0, 255 );
		}

		return $entry;
	}