Hàm lấy thông tin người dùng

@author: 713uk13m <dev@nguyenanhung.com>
@time  : 10/18/18 14:25

@return bool|null
548240
public function msisdnGetInfo()
    {
        try {
            $currentMsisdn = $this->getMsisdnInSession();
            $validNumber   = $this->phoneNumber->is_valid($currentMsisdn);
            $this->logger->debug(__FUNCTION__, 'getMsisdnInSession: ' . json_encode($currentMsisdn));
            $this->logger->debug(__FUNCTION__, 'Valid Number: ' . json_encode($validNumber));
            if ($validNumber) {
                $result = $this->callGetInfo($currentMsisdn);
                $this->logger->debug(__FUNCTION__, 'Result Get Info: ' . json_encode($result));
                if (is_array($result)) {
                    if (isset($result['status']) && $result['status'] == 0) {
                        // tìm thấy thông tin người dùng
                        $dataPackageId = $result['data']['packageId'];
                        if (isset($this->objectSession) && $this->objectSession != NULL && is_object($this->objectSession)) {
                            $this->logger->info(__FUNCTION__, 'Session with CI Session Class');
                            $this->objectSession->set_userdata(self::SESSION_ID_CURRENT_USER_PACKAGE_ID, $dataPackageId);
                        } else {
                            $this->logger->info(__FUNCTION__, 'Session with The Http Foundation Component');
                            $this->session->set(self::SESSION_ID_CURRENT_USER_PACKAGE_ID, $dataPackageId);
                        }

                        return TRUE;
                    }
                }
            }
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->logger->error(__FUNCTION__, $message);

            return NULL;
        }

        return NULL;
    }
1254369
public function getPrevious()
    {
        $pos = $this->getPosition();
        if ($pos == 0) {
            return null;
        } else {
            $this->getInternalIterator()->seek($pos - 1);

            return $this->getCurrent();
        }
    }
631787
public function check()
    {
        $this->loadDatabase();

        $current = $this->getCurrentUptime();

        $this->persist($current);

        $rebooted =
            ($cs = $this->uptimeInSeconds($current)) <
            ($ss = $this->uptimeInSeconds($this->database));

        return $this->makeResult(
            ! $rebooted,
            $this->makeMessage($current, $this->database)
        );
    }
1319843
public function current()
    {
        if (!$this->valid()) {
            return null;
        }

        $ob = $this->_data[$this->_ptr['idx']];

        return is_null($this->_ptr['subidx'])
            ? $ob
            : $ob->addresses[$this->_ptr['subidx']];
    }
418279
protected function getAdminNavId()
    {
        // 1. 从当前视图获取(控制器或行为中的变量)
        $adminNavId = $this->view['adminNavId'];
        if ($adminNavId) {
            return $adminNavId;
        }

        // 2. 从插件配置中获取
        $pluginId = $this->app->getPlugin();
        if ($pluginId) {
            return $this->plugin->getOneById($pluginId)->getOption('adminNavId');
        }

        return null;
    }
1202648
final public function current()
    {
        if (!$this->valid()) {

            return null;
        }

        /*
         * Multiple calls to current() should be idempotent
         */
        if ($this->_lastPositionExecuted !== $this->_position) {

            $this->runToNextYieldStatement();
        }

        return $this->valid() ? $this->getLastYieldedValue() : null;
    }
579021
public function findFirst()
    {
        $rowset = $this->getTableGateway()
            ->select(
                function(Select $select) {
                    $select->columns($this->columns);
                    $select->limit(1);
                    $select->order('id asc');
                }
            );
        $row = $rowset->current();
        if (!$row) {
            return NULL;
        }
        return $row;
    }
163784
public function forupdate() {
        try {
            $this->checkDialect();
        } catch (DialectException $e) {
            return false;
        }
        // 不在事务中锁定失败.
        if (!$this->dialect->inTransaction()) {
            return false;
        }
        $this->forupdate = true;
        $data            = $this->get();
        // 成功
        if ($data) {
            return $data;
        }

        return false;
    }
20873
public function getInfo()
	{
		if ($this->error || !$this->sql) {
			return null;
		}

		$query = 'EXPLAIN FORMAT=JSON ' . $this->sql;
		$query = $this->db->getPdo()->query($query);

		$data = [];
		if ($query) {
			$data = $query->fetch();
		}

		$data = Json::decode($data['EXPLAIN'] ?? '[]');

		return Dumper::toHtml($data, [
			Dumper::COLLAPSE => true,
			Dumper::DEPTH => 6,
		]);
	}
1147202
public function getStatus()
    {
        $this->initialize();
        if ( ! ($this->mongoClient instanceof \MongoClient || $this->mongoClient instanceof \Mongo)) {
            return null;
        }

        return $this->mongoClient->status;
    }
808286
public function getStatus() {
		if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_STATUS])) {
			return $_SESSION[self::SESSION_FIELD_STATUS];
		}
		else {
			return null;
		}
	}
1218946
public function notFound()
    {
        if (isset($this->request->path_array[1])) {
            switch ($this->request->path_array[1]) {
                case 'methods':
                    return $this->getMethods(true);
                    break;
            }
        }

        return null;
    }
93682
public function isSuperUser()
    {
        $result = null;
        if ($result === null && $this->functionInspector->functionAvailable('posix_getuid')) {
            $uid = posix_getuid();
            if (is_int($uid)) {
                $result = $uid === 0;
            }
        }

        return $result;
    }
843755
public function getLast()
    {
        $this->internalDataListUpdate();
        $count = sizeof($this->internalDataListData);
        if (isset($this->internalDataListData[$count - 1])) {
            return $this->internalDataListUpdateValueIfNeeded($this->internalDataListData, $count - 1);
        }
        return null;
    }
1054863
public function getOffset()
    {
        $page = $this->getRequest()->get('page', 1);
        $limit = $this->getRequest()->get('limit');

        return (null != $limit) ? $limit * ($page - 1) : null;
    }
738594
public function current()
    {
        return (($this->rows_count != null && $this->rows_count > 0 ) || !$this->isEmpty())
            ? $this->get($this->position)
            : null
            ;
    }
330980
public function beginOnce()
    {
        $this->createQuery();

        GapOrm::getDriver()->query($this->getQuery(), []);

        $obj = GapOrm::getDriver()->selectOnce();
        $obj = $this->convertFromDB($obj);

        if ($obj) {
            return $obj;
        }

        return null;
    }