Get status information for the mailbox.

@param integer $entry  STATUS_* constant.

@return mixed  Status information.
487172
public function getStatus($entry)
    {
        if (isset($this->_status[$entry])) {
            return $this->_status[$entry];
        }

        switch ($entry) {
        case Horde_Imap_Client::STATUS_FLAGS:
        case Horde_Imap_Client::STATUS_SYNCFLAGUIDS:
        case Horde_Imap_Client::STATUS_SYNCVANISHED:
            return array();

        case Horde_Imap_Client::STATUS_FIRSTUNSEEN:
            /* If we know there are no messages in the current mailbox, we
             * know there are no unseen messages. */
            return empty($this->_status[Horde_Imap_Client::STATUS_MESSAGES])
                ? false
                : null;

        case Horde_Imap_Client::STATUS_RECENT_TOTAL:
        case Horde_Imap_Client::STATUS_SYNCMODSEQ:
            return 0;

        case Horde_Imap_Client::STATUS_PERMFLAGS:
            /* If PERMFLAGS is not returned by server, must assume that all
             * flags can be changed permanently (RFC 3501 [6.3.1]). */
            $flags = isset($this->_status[Horde_Imap_Client::STATUS_FLAGS])
                ? $this->_status[Horde_Imap_Client::STATUS_FLAGS]
                : array();
            $flags[] = "\\*";
            return $flags;

        case Horde_Imap_Client::STATUS_UIDNOTSTICKY:
            /* In the absence of explicit uidnotsticky identification, assume
             * that UIDs are sticky. */
            return false;

        case Horde_Imap_Client::STATUS_UNSEEN:
            /* If we know there are no messages in the current mailbox, we
             * know there are no unseen messages . */
            return empty($this->_status[Horde_Imap_Client::STATUS_MESSAGES])
                ? 0
                : null;

        default:
            return null;
        }
    }
847882
public function getStatus($id)
    {
        if ($this->isSuccess()) {
            foreach ($this->getResult() as $row) {
                if ($row['id'] == $id) {
                    return $row['status'];
                }
            }
        }

        return false;
    }
95633
public function getTicketStatus($statusStr)
    {
        static $statuses = false;

        if ($statuses === false) {
            $statuses = [];

            foreach (TicketMessageInterface::STATUSES as $id => $value) {
                $statuses[$id] = $this->translate($value);
            }
        }

        return \array_search($statusStr, $statuses);
    }
53315
function statusObject()
    {
        if ( $this->Status === null )
        {
            $this->Status = eZOrderStatus::fetchByStatus( $this->StatusID );
        }
        return $this->Status;
    }
277118
function status( $asObject = false )
    {
        if ( $asObject )
            return eZOrderStatus::fetch( $this->StatusID );
        else
            return $this->StatusID;
    }
1310838
public function isAllowed($entry)
    {
        foreach ($this->entries as $elmt) {
            if ($elmt->check($entry)) {
                return $this->matchingResponse;
            }
        }

        return null;
    }
414970
public static function fromRawEntry($entry)
	{
		$className = get_called_class();
		$class = new $className();

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

		return $class;
	}
895773
public function getStatus($id = null)
    {
        if ($this->isSuccess()) {
            if (!$id) {
                $result = $this->getResult();
                return $result[0]['status'];
            }

            foreach ($this->getResult() as $row) {
                if ($row['id'] == $id) {
                    return $row['status'];
                }
            }
        }

        return false;
    }
562238
public function getIndex( $entry, $section = NULL )
	{
		if( !$section )
			$section	= $this->getSectionOfEntry( $entry );
		if( !isset( $this->list[$section] ) )
			throw new InvalidArgumentException( 'Invalid Section "'.$section.'".' );
		return array_search( $entry, $this->list[$section] );
	}
97962
public function getProfile($email)
    {
        $url = $this->getProfileUrl($email);

        $httpClient = &$this->httpClient;
        $response = $httpClient->get($url);

        $data = $response->json();

        return $data['entry'][0];
    }
968509
public function getNextPlayableGame($entry = null)
    {
        $sortedPlayableGames = $this->getPlayableGames($entry);

        return (count($sortedPlayableGames) >= 1)?current($sortedPlayableGames)->getGame():null;
    }
51064
public function getStatus()
    {
        /** @var $result CallResult */
        $result = $this->getGit()->{'status'}($this->getRepositoryPath(), array(
            '--short'
        ));
        $result->assertSuccess(
            sprintf('Cannot retrieve status from "%s"', $this->getRepositoryPath())
        );

        $output = rtrim($result->getStdOut());
        if (empty($output)) {
            return array();
        }

        $status = array_map(function($f) {
            $line   = rtrim($f);
            $parts  = array();
            preg_match('/^(?<x>.)(?<y>.)\s(?<f>.+?)(?:\s->\s(?<f2>.+))?$/', $line, $parts);

            $status = array(
                'file'      => $parts['f'],
                'x'         => trim($parts['x']),
                'y'         => trim($parts['y']),
                'renamed'   => (array_key_exists('f2', $parts)) ? $parts['f2'] : null
            );
            return $status;
        }, explode("\n", $output));
        return $status;
    }
172355
protected function getStatusCode(Exception $exception)
    {
        if ($exception instanceof ValidationException) {
            return $exception->status;
        }

        return $this->getExceptionStatusCode($exception);
    }
67430
private function getVatTypeField(array $entry)
    {
        if (!empty($entry['vatreversecharge'])) {
            if (!empty($entry['foreigneu'])) {
                $vatType = API::VatType_EuReversed;
            } else {
                $vatType = API::VatType_NationalReversed;
            }
        } elseif (!empty($entry['marginscheme'])) {
            $vatType = API::VatType_MarginScheme;
        } elseif (!empty($entry['foreignvat'])) {
            $vatType = API::VatType_ForeignVat;
        } elseif (!empty($entry['foreignnoneu'])) {
            $vatType = API::VatType_RestOfWorld;
        } else {
            $vatType = API::VatType_National;
        }
        return array(
            'vat_type' => array(
            'type' => 'markup',
            'label' => $this->t('vat_type'),
            'value' => $this->t('vat_type_' . $vatType),
            ),
        );
    }
616099
protected function parseHeaders(array $entry)
    {
        $headers = array();

        if (!is_array($entry['msgstr'])) {
            return $headers;
        }

        foreach ($entry['msgstr'] as $headerRaw) {
            $parts = explode(':', $headerRaw);
            if (count($parts) < 2) {
                continue;
            }

            $parts[1] = ltrim($parts[1]);
            $values = array_slice($parts, 1);
            $headerValue = rtrim(implode(':', $values));

            $headers[$parts[0]] = $headerValue;
        }

        return $headers;
    }
432163
public function search($entry)
    {
        $data = TrimContentTransformer::trim($this->fileReader->read());

        if (in_array($entry, $data)) {
            return true;
        }

        foreach ($data as $item) {
            if (0 === strpos($entry, $item)) {
                return true;
            }
        }

        return false;
    }
713557
public function get($id)
    {
        $entry = $this->getEntry($id);
        return $this->isMiss($entry) ? null : $this->getPayload($id, $entry);
    }