Returns the most recent statuses.
https://dev.twitter.com/rest/reference/get/statuses/user_timeline
@param  int  $flags  timeline (ME | ME_AND_FRIENDS | REPLIES) and optional (RETWEETS)
@return stdClass[]
@throws Exception
764798
public function load(int $flags = self::ME, int $count = 20, array $data = null): array
	{
		static $timelines = [
			self::ME => 'user_timeline',
			self::ME_AND_FRIENDS => 'home_timeline',
			self::REPLIES => 'mentions_timeline',
		];
		if (!isset($timelines[$flags & 3])) {
			throw new \InvalidArgumentException;
		}

		return $this->cachedRequest('statuses/' . $timelines[$flags & 3], (array) $data + [
			'count' => $count,
			'include_rts' => $flags & self::RETWEETS ? 1 : 0,
		]);
	}
401397
public function getFlags()
    {
        $returnValue = array();

        
        $currentAnnotations = $this->getAnnotations();
        if (isset($currentAnnotations[self::FLAGS])){
            $returnValue = explode(" ", $currentAnnotations[self::FLAGS]);
        }
        

        return (array) $returnValue;
    }
14440
public function getTimeline(DataObject $member, $sortBy = 'ID',  $since = 0, $before = false, $topLevelOnly = true, $tags = array(), $offset = 0, $number = 10) {
		$following = $this->friendsList($member);

		// TODO Following points to a list of Profile IDs, NOT user ids.
		$number = (int) $number;
		$userIds = array();
		if ($following) {
			$userIds = $following->map('OtherID', 'OtherID');
			$userIds = $userIds->toArray();
		}

		$userIds[] = $member->ID;
		
		$filter = array(
			'OwnerID' => $userIds, 
		);
		
		return $this->microPostList($filter, $sortBy, $since, $before, $topLevelOnly, $tags, $offset, $number);
	}
1211490
public function getStat($path, $flags)
  {
    $entity = $this->getEntity($path);

    if (is_null($entity)) {
      $path = null;
    } elseif ($entity instanceof Entity_Deleted_Interface) {
      $path = null;
    } elseif (!$entity->file_exists()) {
      $path = null;
    } else {
      $path = $entity->path();
    }

    if (is_null($path)) {
      $stat = false;
    } elseif ($flags & STREAM_URL_STAT_QUIET) {
      $stat = @stat($path);
    } else {
      $stat = stat($path);
    }

    return $stat;
  }
1364624
private static function decodeFlags($flags): array
    {
        return [
            'qr' => $flags >> 15 & 0x1,
            'opcode' => $flags >> 11 & 0xf,
            'aa' => $flags >> 10 & 0x1,
            'tc' => $flags >> 9 & 0x1,
            'rd' => $flags >> 8 & 0x1,
            'ra' => $flags >> 7 & 0x1,
            'z' => $flags >> 4 & 0x7,
            'rcode' => $flags & 0xf,
        ];
    }
502625
public function getUserFlags() : array
    {
        if ($this->flags !== null) {
            return $this->flags;
        }

        $this->flags = [];
        $usergroups = $this->usergroups;

        foreach ($usergroups as $usergroup) {
            $group = $usergroup->group;
            $flags = $group->flags;

            if (!empty($flags)) {
                $this->flags = array_merge($this->flags, $flags);
            }
        }

        return $this->flags;
    }
17005
public static function get ($status = FALSE)
	{
		
		// If no status return all messages
		
		if ($status === FALSE)
		{
			return self::$messages;
		}
		
		// Return messages for a specific status
		
		if (isset (self::$messages[$status]))
		{
			return self::$messages[$status];
		}
		else
		{
			return array ();
		}
		
	}
403799
public function updateStatusFlags(&$flags)
    {
        $embargo = $this->getIsPublishScheduled();
        $expiry = $this->getIsUnPublishScheduled();

        if ($embargo || $expiry) {
            unset($flags['addedtodraft'], $flags['modified']);
        }

        if ($embargo && $expiry) {
            $flags['embargo_expiry'] = array(
                'text' => _t('WorkflowEmbargoExpiryExtension.BADGE_PUBLISH_UNPUBLISH', 'Embargo+Expiry'),
                'title' => sprintf(
                    '%s: %s, %s: %s',
                    _t('WorkflowEmbargoExpiryExtension.PUBLISH_ON', 'Scheduled publish date'),
                    $this->owner->PublishOnDate,
                    _t('WorkflowEmbargoExpiryExtension.UNPUBLISH_ON', 'Scheduled un-publish date'),
                    $this->owner->UnPublishOnDate
                ),
            );
        } elseif ($embargo) {
            $flags['embargo'] = array(
                'text' => _t('WorkflowEmbargoExpiryExtension.BADGE_PUBLISH', 'Embargo'),
                'title' => sprintf(
                    '%s: %s',
                    _t('WorkflowEmbargoExpiryExtension.PUBLISH_ON', 'Scheduled publish date'),
                    $this->owner->PublishOnDate
                ),
            );
        } elseif ($expiry) {
            $flags['expiry'] = array(
                'text' => _t('WorkflowEmbargoExpiryExtension.BADGE_UNPUBLISH', 'Expiry'),
                'title' => sprintf(
                    '%s: %s',
                    _t('WorkflowEmbargoExpiryExtension.UNPUBLISH_ON', 'Scheduled un-publish date'),
                    $this->owner->UnPublishOnDate
                ),
            );
        }
    }
949919
public function getTweetsFromUser($username, $count = 10, $cacheMinutes = 30, $returnEntities = true)
    {
        $count = $this->getVerifiedCount($count, 1, 200);

        $endpoint = '/statuses/user_timeline.json';

        $url = $this->urlHelper->joinSlugs([$this->baseUrl, $this->apiVersion, $endpoint]);

        $data = [
            'screen_name' => $username,
            'count' => $count
        ];

        $headers = [
            'Authorization' => 'Bearer ' . $this->requestAppAccessToken()
        ];

        $response = $this->courier->get($url, $data, $headers, $cacheMinutes);

        if ($returnEntities)
        {
            $tweets = $response->toArray();
            $response = $this->createTweetEntities($tweets);
        }

        return $response;
    }
818319
public function getCurrentUserPrincipals()
    {
        $currentUser = $this->getCurrentUserPrincipal();

        if (is_null($currentUser)) {
            return [];
        }

        return array_merge(
            [$currentUser],
            $this->getPrincipalMembership($currentUser)
        );
    }
272037
public function lastReply()
    {
        try {
            $replies = ForumReply::where('post_id', $this->id)->get();

            if ($replies->isEmpty()) {
                return null;
            }

            $reply = $replies->last();

            return [
                'author' => $reply->author->name,
                'date' => $reply->created_at
            ];
        } catch (Exception $e) {
            return null;
        }
    }
614403
@Override
    public void getMentions() {
        getDispatcher().invokeLater(new AsyncTask(MENTIONS_TIMELINE, listeners) {
            @Override
            public void invoke(List<TwitterListener> listeners) throws TwitterException {
                ResponseList<Status> statuses = twitter.getMentionsTimeline();
                for (TwitterListener listener : listeners) {
                    try {
                        listener.gotMentions(statuses);
                    } catch (Exception e) { 
                        logger.warn("Exception at getMentions", e);
                    }
                }
            }
        });
    }
627563
protected function getFlags(): ?int
	{
		if($this->version === null)
		{
			return null;
		}

		switch($this->version)
		{
			case 'v4':
				return FILTER_FLAG_IPV4;
			case 'v6':
				return FILTER_FLAG_IPV6;
			default:
				throw new RuntimeException(vsprintf('Invalid IP version [ %s ]. The accepted versions are v4 and v6.', [$this->version]));
		}
	}
496050
public function ksort($flags = SORT_REGULAR)
    {
        $this->_modified = true;
        return ksort($this->_storage, $flags);
    }
1206015
public function getByStatus($status)
    {
        $components = [];

        foreach ($this->all() as $name => $component) {
            if ($component->isStatus($status)) {
                $components[$name] = $component;
            }
        }

        return $components;
    }
467708
public function getFlag($flag)
    {
        return isset($this->_parts['flags'][$flag]) ? $this->_parts['flags'][$flag] : null;
    }
1340296
public function getStatusesUserTimeline(array $parameters = array(), $multipart = false, $appOnlyAuth = false)
    {
        return $this->get('statuses/user_timeline', $parameters, $multipart, $appOnlyAuth);
    }