2018-11-13
@used-by \Df\StripeClone\Facade\Customer::cardsActive()
@return bool
181395
final function isActive() {return /** @var int $y1 */ /** @var int $y2 */
		($y1 = df_year()) < ($y2 = $this->expYear()) || ($y1 === $y2 && df_month() <= $this->expMonth())
	;}
20709
protected function active()
    {
        if( empty($activeDatabaseList = $this->getActiveDatabaseList()) )
        {
            return false;
        }

        $this->setActiveDatabaseEncoding($encoding);

        $status = false;

        $tableKeyColumnDesignData = $this->getTableKeyColumnDesignData();
        
        foreach( $activeDatabaseList as $database )
        {
            $this->forge->createDatabase($database, $encoding);

            if( ! empty($activeTableList = $this->getTableListByActiveDatabase($database)) )
            {
                $dbForge = $this->getDBForgeDifferentConnectionByDatabaseName($database);
                $db      = $this->getDBDifferentConnectionByDatabaseName($database);

                foreach( $activeTableList as $table )
                {
                    $activeTableColumnSchema = $this->getActiveTableColumnSchema($database, $table);

                    $this->addIdColumnToActiveTableIfNotExists($activeTableColumnSchema);

                    $activeTableColumns = $this->getActiveTableColumns($table = $this->getTableNameWithoutExtension($table), $db);

                    $this->getActiveTableKeyAndColumns($activeTableColumns, $activeTableKey, $activeTableColumns);

                    $currentTableKey = $this->getCurrentTableKey($table, $activeTableColumnSchema);

                    if( ! empty($activeTableColumns) )
                    {
                        $columnsMerge = array_merge(array_flip($activeTableColumns), $activeTableColumnSchema);

                        foreach( $columnsMerge as $key => $val )
                        {
                            if( is_numeric($val) )
                            {
                                $this->dropColumnFromActiveTable($table, $key, $dbForge, $status);
                            }
                            elseif( in_array($key, $activeTableColumns) )
                            {
                                $this->modifyColumnFromActiveTable($table, $key, $val, $dbForge, $status, $activeTableKey, $currentTableKey);
                            }
                            else
                            {
                                $this->addColumnFromActiveTable($table, $key, $val, $dbForge, $status);
                            }
                        }

                        if( $status === true )
                        {
                            $this->addTableToArchive($database, $table);
                        }
                    }
                    else
                    {
                        $activeTableColumnSchema[$currentTableKey] = $tableKeyColumnDesignData;

                        $dbForge->createTable($table, $activeTableColumnSchema);
                    }
                }
            }
        }
    }
261444
public function getCardColors() {
        if (!$this->access_token && !$this->checkAuth()) return false;
        $result = $this->http_get(self::API_BASE_URL_PREFIX . self::CARD_GETCOLORS . 'access_token=' . $this->access_token);
        if ($result) {
            $json = json_decode($result, true);
            if (!$json || !empty($json['errcode'])) {
                $this->errCode = $json['errcode'];
                $this->errMsg  = $json['errmsg'];
                return false;
            }
            return $json;
        }
        return false;
    }
1045227
public function isExpressCheckoutEnabled()
    {
        if ($this->expressCheckoutEnabled === null) {
            $this->expressCheckoutEnabled = false;
            if ($this->getPayPalConfig()->isExpressCheckoutEnabled()) {
                $user = $this->getUser();
                $validator = $this->getPaymentValidator();
                $validator->setUser($user);
                $validator->setConfig($this->getConfig());
                $validator->setCheckCountry(false);

                $this->expressCheckoutEnabled = $validator->isPaymentValid();
            }
        }

        return $this->expressCheckoutEnabled;
    }
1228202
public function isActive()
	{
		$this->numberChecks++;
		$time	= microtime( TRUE ) - $this->time;
		return $time < $this->seconds;
	}
1086873
public function getCardColors()
    {
        $result = $this->httpGet(static::WECHAT_GET_CARD_COLORS_URL . 'access_token=' . $this->getAccessToken());
        return isset($result['colors']) ? $result['colors'] : false;
    }
1081386
public function isTransactionActive()
    {
        try {
            $isTransactionActive = $this->connection->isTransactionActive();
        } catch (DBALException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        } catch (PDOException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        }

        return $isTransactionActive;
    }
1182728
public function isPaymentActive()
    {
        $result = false;
        if ($payPalPayment = $this->getPayment()) {
            $result = $payPalPayment->oxpayments__oxactive->value ? true : false;
        }

        return $result;
    }
456187
public function isExpressCheckoutEnabledInMiniBasket()
    {
        $expressCheckoutEnabledInMiniBasket = false;
        if ($this->isExpressCheckoutEnabled() && $this->getPayPalConfig()->isExpressCheckoutInMiniBasketEnabled()) {
            $expressCheckoutEnabledInMiniBasket = true;
        }

        return $expressCheckoutEnabledInMiniBasket;
    }
235977
protected function fetchExistsActivePromotion()
    {
        $query = "select 1 from " . getViewName('oxactions') . " where oxtype=2 and oxactive=1 and oxshopid='" . \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId() . "' limit 1";

        return \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($query);
    }
430252
public function isActive()
    {
        return $this->exists &&
                isset($this->_gemsData['gap_status']) &&
                $this->agenda->isStatusActive($this->_gemsData['gap_status']);
    }
454017
public function isActive() {
        if (!$this->getValue(
                self::KEY_ACTIVE,
                $this->storeManager->getStore()
            )) {
            return false;
        }

        $quote = $this->checkoutSession->getQuote();

        return (bool) in_array($quote->getQuoteCurrencyCode(), $this->getAcceptedCurrencies());
    }
91816
public function isActive()
    {
        $active = ($this->cookie !== null && $this->cookie != '');
        
        if ($this->sizeLimit && $this->sizeLimit === $this->pageSize) {
            $active = false;
        }
        
        return $active;
    }
295641
public function sortActive()
    {
        $sortIndex = $this->_sortIndex();
        if ($sortIndex === null) {
            return false;
        }
        return $sortIndex == $this->index();
    }
193766
public function has_active_instances() {
        global $DB;
        if (empty($this->definition->id)) {
            return false;
        }
        if ($this->hasactiveinstances === null) {
            $conditions = array('definitionid'  => $this->definition->id,
                        'status'  => gradingform_instance::INSTANCE_STATUS_ACTIVE);
            $this->hasactiveinstances = $DB->record_exists('grading_instances', $conditions);
        }
        return $this->hasactiveinstances;
    }
1084063
public function isActive()
    {
        $moduleId = $this->getExtensionId();
        $moduleIsActive = false;

        $modules = $this->getExtendedClasses();

        if (is_array($modules)) {
            // Check if module was ever installed.
            $moduleExists = false;
            foreach ($modules as $extendPath) {
                if (false !== strpos($extendPath, '/' . $moduleId . '/')) {
                    $moduleExists = true;
                    break;
                }
            }

            // If module exists, check if it is not disabled.
            if ($moduleExists) {
                $disabledModules = $this->getDisabledModules();
                if (!(is_array($disabledModules) && in_array($moduleId, $disabledModules))) {
                    $moduleIsActive = true;
                }
            }
        }

        return $moduleIsActive;
    }
437732
function is_paying() {
            $this->_logger->entrance();

            if ( ! $this->is_registered() ) {
                return false;
            }

            if ( ! $this->has_paid_plan() ) {
                return false;
            }

            return (
                ! $this->is_trial() &&
                'free' !== $this->get_plan_name() &&
                $this->has_active_valid_license()
            );
        }