Return array information of all employees

@param string $guid GUID of employee
@param int|string $limit Limit for result
@return array|null Return array of informationa about a employees,
or Null if no result.
329675
public function getAllEmployees($guid = null, $limit = CAKE_LDAP_SYNC_AD_LIMIT) {
		$fields = $this->getListLocalFields();
		$conditions = [];
		if (!empty($guid)) {
			$conditions[$this->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID] = $guid;
		}
		$order = [$this->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID => 'asc'];
		$contain = $this->getListContain(['Manager', 'Subordinate']);
		$result = $this->find('all', compact(
			'fields',
			'conditions',
			'order',
			'limit',
			'contain'
		));

		return $result;
	}
330066
public function members(int $limit = 100) : array
    {
        $returnMembers = [];

        $members = $this->get(sprintf(self::COMMUNITY_ENDPOINT . 'communities/%s/members', $this->id()), [
            'limit' => $limit
        ]);

        if ($members->size === 0) return $returnMembers;

        foreach ($members->members as $member) {
            $returnMembers[] = new User($this->client, $member->onlineId);
        }

        return $returnMembers;
    }
1288893
public function getItems($offset, $limit) {
		$this->select->limit($limit, $offset);
		
		return $this->datagate->fetchAll($this->select);
	}
31774
public function getRuleIds($uid){
        
        $groups = $this->getGroup($uid);
        
        $rules = [];
        foreach ($groups as $g){
            $rule = $g['rules'] ? explode(',', $g['rules']) : '';
            if ($rule){
                $rules = array_merge($rules , $rule);
            } 
        }
        
        return $rules;
    }
360650
public static function getGroupMemberRoles($uid, $gid)
	{
		$db = \App::get('db');
		$sql = "SELECT r.id, r.name, r.permissions FROM `#__xgroups_roles` as r, `#__xgroups_member_roles` as m WHERE r.id=m.roleid AND m.uidNumber=" . $db->quote($uid) . " AND r.gidNumber=" . $db->quote($gid);
		$db->setQuery($sql);

		return $db->loadAssocList();
	}
144595
public function getObjectInstanceByGuid($guid)
    {
        if (isset($this->objectsByGuid[$guid])) {
            return $this->objectsByGuid[$guid];
        } else {
            return null;
        }
    }
1075189
public function fetchAll($limit = null, $offset = null){
		$limit = $limit === null ? -1 : (int) $limit;
		if($offset !== null)
			$this->seek((int) $offset);

		$row = $this->fetch();
		if(!$row)
			return array();

		$rows = array();
		do{
			if($limit === 0)
				break;
			$rows[] = $row;
			$limit--;
		} while($row = $this->fetch());

		return $rows;
	}
40339
public function getJobs($limit = null)
    {
        $qb = $this->em->createQueryBuilder();
        $qb->select('job')
                ->from($this->jobEntityName, 'job')
                ->where(sprintf("job.%s = :job_status_active", $this->jobStatusColumn))
                ->orderBy(sprintf('job.%s', $this->jobPriorityColumn), 'DESC')
                ->addOrderBy(sprintf('job.%s', $this->jobDateLastRunColumn), 'ASC')
                ->setParameter('job_status_active', JobInterface::STATUS_ACTIVE);

        if (null !== $limit) {
            $qb->setMaxResults($limit);
        }

        return $qb->getQuery()->getResult();
    }
749037
public function getMySqlData($limit, $offset)
    {

        try {
            $data = app('db')
                ->connection('mysql')
                ->select("select id as uid ,name,mobile,full_address,worker_lat,worker_lng,created_at,updated_at from " . config("database.mysql_workers") . " limit {$offset},{$limit}");
        } catch (\Exception $e) {
            Log::info('c=CopydataApiController f=getMySqlData  msg=' . $e->getMessage());
            return false;
        }
        return $data;
    }
479967
public function getResults($checkId, $limit = 100, array $probes = null)
	{
		$client = new \Guzzle\Service\Client('https://api.pingdom.com/api/2.0');

		/** @var $request \Guzzle\Http\Message\Request */
		$request = $client->get('results/' . $checkId, array('App-Key' => $this->token));
		$request->setAuth($this->username, $this->password);
		$request->getQuery()->set('limit', $limit);

		if (is_array($probes)) {
			$request->getQuery()->set('probes', implode(',', $probes));
		}

		$response = $request->send();
		$response = json_decode($response->getBody(), true);

		return $response['results'];
	}
106342
public function peek(int $limit = 1): array
    {
        if ($limit !== 1) {
            throw new JobQueueException('The beanstalkd Jobqueue implementation currently only supports to peek one job at a time', 1352717703);
        }
        try {
            $pheanstalkJob = $this->client->peekReady($this->name);
        } catch (ServerException $exception) {
            return [];
        }
        if ($pheanstalkJob === null || $pheanstalkJob === false) {
            return [];
        }

        return [new Message((string)$pheanstalkJob->getId(), json_decode($pheanstalkJob->getData(), true))];
    }
329822
private function &getEntryForGuid( $guid )
	{
		if ( ! isset( $this->uniqueFactIds[ $guid ] ) )
		{
			return false;
		}

		// Get the element
		$facts = $this->getElement( $this->uniqueFactIds[ $guid ] );

		// And find the entry with the corresponding guid
		foreach ( $facts as $key => &$entry )
		{
			if ( $entry['guid'] == $guid ) return $entry;
		}

		return false;
	}
679313
public function getUserinfo($uid = null)
	{
		$ret = array();
		if (extension_loaded('posix')) {
			if (is_null($uid)) {
				$uid = posix_geteuid();	// get effective userid
			} elseif (is_string($uid)) {
				// username passed?
				$ret = posix_getpwnam($uid);
			}
			if (empty($ret)) {
				$ret = posix_getpwuid($uid);
			}
			$ret['group'] = posix_getgrgid($uid_info['gid']);
			unset($ret['gid']);	// is inside group array
		}
		return $ret;
	}
716973
public function readByUser(int $userId, int $expirationInSeconds, int $limit = null): array
    {
        $schema = $this->getDatabaseSchema();
        /** @var TokenInterface[] $tokens */
        $tokens = $this->readEnabledTokensByColumnWithExpirationCheck(
            $userId,
            $schema->getTokensUserIdentityColumn(),
            $expirationInSeconds,
            $schema->getTokensValueCreatedAtColumn(),
            ['*'],
            $limit
        );

        return $tokens;
    }
1004549
public function getMethod($uid, $employee_id)
    {
        $result = $this->getMethodInternal(compact('uid', 'employee_id'));
        $statusCode = (int)$result[ 'statusCode' ];

        if ($statusCode === 200) {
            return $this->getResultAsArrayWithoutStatusCode($result);
        }

        $this->reportUnexpectedResponse($result, 1541006615);
    }
298200
public function getPosts( $limit = 100 ) {

        return $this->parseGetPosts(
            $this->service->api( $this->getWallGetRequestUrl( $limit ), 'GET' ),
            'response',
            [
                'id',
                'text'
            ],
            [
                'service_id_author' => 'from_id',
                'service_id_post'   => 'id',
                'time_created'      => 'date',
                'content'           => 'text'
            ] );
    }
1037845
public function getUser(string $employeeId)
    {
        $result = $this->getUserInternal([
            'employee_id' => $employeeId,
        ]);
        $statusCode = (int)$result[ 'statusCode' ];
        
        if ($statusCode === 200) {
            return $this->getResultAsArrayWithoutStatusCode($result);
        } elseif ($statusCode === 204) {
            return null;
        }
        
        $this->reportUnexpectedResponse($result, 1490808555);
    }