Verifica se o valor passado corresponde ao tipo/formato.
esperado.

@param       ?string $v
Valor a ser testado.

@param       ?array $aux
Dados auxiliares para o processamento.

@return      bool
545189
public static function check(?string $v, ?array $aux = null) : bool
    {
        if (self::formatNumber($v) !== null) {
            return true;
        }

        return false;
    }
214665
public function setIsMultilingualFeatureAvValue($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->is_multilingual_feature_av_value !== $v) {
            $this->is_multilingual_feature_av_value = $v;
            $this->modifiedColumns[FeatureTypeTableMap::IS_MULTILINGUAL_FEATURE_AV_VALUE] = true;
        }


        return $this;
    }
943142
public function check($value, IValidationData $data = null) {
        if (is_string($value)) {
            return strlen($value) <= $this->max;
        } else if (is_array($value)) {
            return count($value) <= $this->max;
        }

        return false;
    }
720534
static function isValidMId( $vMId )
	{
		$bRet	= false;

		if ( is_array( $vMId ) && count( $vMId ) > 0 )
		{
			$bRet	= true;
			foreach ( $vMId as $vItem )
			{
				if ( ! CDId::getInstance()->isValidId( $vItem ) )
				{
					$bRet = false;
					break;
				}
			}
		}
		else
		{
			$bRet = CDId::getInstance()->isValidId( intval( $vMId ) );	
		}

		return $bRet;
	}
310065
public function validate_value($vtype, $value) {
        if ($value === false) {
            // Value "false" means default and is allowed for this setting type even if it does not match $vtype.
            return $value;
        }
        return parent::validate_value($vtype, $value);
    }
561397
private static function boolToString($v)
        {
            //convert boolean to text value.
            $v = $v === true ? 'true' : $v;
            $v = $v === false ? 'false' : $v;

            return $v;
        }
366272
private function __verify($strValue)
    {
        $blnReturn = false;
        $strLowerValue = strtolower($strValue);
        $strCompareAgainst = (is_string($this->__value)) ? strtolower($this->__value) : null;

        switch ($this->__comparison) {
            case ValidForm::VFORM_COMPARISON_EQUAL:
                $blnReturn = ($strLowerValue == $strCompareAgainst);
                break;
            case ValidForm::VFORM_COMPARISON_NOT_EQUAL:
                $blnReturn = ($strLowerValue != $strCompareAgainst);
                break;
            case ValidForm::VFORM_COMPARISON_LESS_THAN:
                $blnReturn = ($strValue < $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_GREATER_THAN:
                $blnReturn = ($strValue > $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_LESS_THAN_OR_EQUAL:
                $blnReturn = ($strValue <= $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_GREATER_THAN_OR_EQUAL:
                $blnReturn = ($strValue >= $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_EMPTY:
                $blnReturn = empty($strValue);
                break;
            case ValidForm::VFORM_COMPARISON_NOT_EMPTY:
                $blnReturn = ! empty($strValue);
                break;
            case ValidForm::VFORM_COMPARISON_STARTS_WITH:
                // strpos is faster than substr and way faster than preg_match.
                $blnReturn = (strpos($strLowerValue, $strCompareAgainst) === 0);
                break;
            case ValidForm::VFORM_COMPARISON_ENDS_WITH:
                $blnReturn = (substr($strLowerValue, - strlen($strCompareAgainst)) === $strCompareAgainst);
                break;
            case ValidForm::VFORM_COMPARISON_CONTAINS:
                $blnReturn = (strpos($strLowerValue, $strCompareAgainst) !== false);
                break;
            case ValidForm::VFORM_COMPARISON_REGEX:
                $blnReturn = preg_match($this->__value, $strValue);
                break;
            case ValidForm::VFORM_COMPARISON_IN_ARRAY:
                $blnReturn = in_array($strValue, $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_NOT_IN_ARRAY:
                $blnReturn = !in_array($strValue, $this->__value);
                break;
        }

        return $blnReturn;
    }
159673
public function exchangeArray($array)
    {
        return $this->setId(isset($array['id'])?$array['id']:null)
            ->setProdutoId($array['produto_id'])
            ->setStatusId(isset($array['status_id'])?$array['status_id']:null)
            ->setAutenticacaoId($array['autenticacao_id'])
            ->setData(isset($array['data'])?$array['data']:null)
            ->setQuantidade(isset($array['quantidade'])?$array['quantidade']:self::QUANTIDADE_DAFAULT);
    }
22581
public static function isTrue($value, $format, $args = null, $_ = null) {
        if (!$value) {
            self::vfail($format, array_slice(func_get_args(), 2));
        }
        return $value;
    }
956201
public static function atualizarLinhaDigitavel($linha, Carbon $vencto, $valor)
    {
        $inicio = substr($linha, 0, 32);

        $vencto = str_pad(self::fatorVencimento($vencto), 4, '0', STR_PAD_LEFT); // Novo fator de vencimento
        $valor = str_pad(self::fatorValor($valor), 10, '0', STR_PAD_LEFT); // Valor atualizado

        // Montar nova barra para calcular o novo dígito
        $barra = substr($linha, 0, 4)
            //. substr($linha, 32,  1)
            . $vencto . $valor
            . substr($linha, 4, 5)
            . substr($linha, 10, 10)
            . substr($linha, 21, 10);

        $digito = self::modulo11($barra);

        return sprintf('%s%s%s%s', $inicio, $digito, $vencto, $valor);
    }
532514
public function setDtCall($v)
    {
        $dt = PropelDateTime::newInstance($v, null, 'DateTime');
        if ($this->dt_call !== null || $dt !== null) {
            $currentDateAsString = ($this->dt_call !== null && $tmpDt = new DateTime($this->dt_call)) ? $tmpDt->format('Y-m-d H:i:s') : null;
            $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
            if ($currentDateAsString !== $newDateAsString) {
                $this->dt_call = $newDateAsString;
                $this->modifiedColumns[] = ApiLogPeer::DT_CALL;
            }
        } // if either are not null


        return $this;
    }
98359
protected static function _isBlankNode($v) {
    // Note: A value is a blank node if all of these hold true:
    // 1. It is an Object.
    // 2. If it has an @id key its value begins with '_:'.
    // 3. It has no keys OR is not a @value, @set, or @list.
    $rval = false;
    if(is_object($v)) {
      if(property_exists($v, '@id')) {
        $rval = (strpos($v->{'@id'}, '_:') === 0);
      } else {
        $rval = (count(get_object_vars($v)) === 0 ||
          !(property_exists($v, '@value') ||
            property_exists($v, '@set') ||
            property_exists($v, '@list')));
      }
    }
    return $rval;
  }
771926
public function formatDifference(Verta $v = null)
    {
        $difference = $this->diffSeconds($v);
        $absolute = $difference < 0 ? self::POST : self::PRE;
        $difference = abs($difference);

        for ($j = 0; $difference >= static::$unitNumber[$j] and $j < count(static::$unitNumber) - 1; $j++) {
            $difference /= static::$unitNumber[$j];
        }
        $difference = intval(round($difference));

        if($difference === 0) {
            return self::NOW;
        }

        return sprintf('%s %s %s', $difference, static::$unitName[$j], $absolute);
    }
328763
protected function issetInObjectOrArray($actValue, $key)
    {
        if (is_object($actValue) && property_exists($actValue, $key)) {
            return $actValue->$key;
        }
        if (isset($actValue[$key])) {
            return $actValue[$key];
        }

        return false;
    }
412983
public function populateSelect($params, $arrayDepend = null, $populateValues = null) {

        $db = \Cityware\Db\Factory::factory('zend');

        /* Verifica o schema se está setado ou não */
        $schema = (isset($params['schema']) and $params['schema'] != "") ? $params['schema'] : null;

        /* Verifica foi setado um alias para a tabela de FROM */
        $aliasFromFk = (isset($params['tableAliasFk']) and ! empty($params['tableAliasFk'])) ? $params['tableAliasFk'] : 'fk';


        /* Define os campos */
        $db->select("{$aliasFromFk}.{$params['fieldfk']}", 'ID');
        $db->select("{$aliasFromFk}.{$params['fieldshow']}", 'NOME');

        /* Verifica se existe algum campo concatenado */
        if (isset($params['tableconc']) and ! empty($params['tableconc'])) {
            $db->select("{$params['tableconc']}.{$params['fieldconc']}", 'CONCAT');
        }

        /* Define a ordem de exibição dos dados */
        
        if (isset($params['order']) and $params['order'] == 'ID') {
            $db->orderBy("ID ASC");
        } else {
            $db->orderBy("NOME ASC");
        }


        /* Define a tabela */
        $db->from("{$params['tablefk']}", $aliasFromFk, $schema);

        /* Monta a condição do SELECT em caso de dependência */
        if (!empty($arrayDepend)) {
            if (isset($params['dependfk']) and ! empty($params['dependfk'])) {
                $db->where("{$params['dependfk']} = '{$arrayDepend[$params['dependfk']]}'");
            }
            if (isset($params['where']) and ! empty($params['where'])) {
                foreach ($params['where'] as $keyWhere => $valueWhere) {
                    $db->where($this->prepareWherePhpTag($valueWhere));
                }
            }
        } else
        /* Monta a condição do SELECT em caso de populate */
        if (!empty($populateValues)) {
            if (isset($params['fieldpk']) and ! empty($params['fieldpk'])) {
                $db->where("{$params['fieldpk']} = '{$populateValues[$params['fieldpk']]}'");
            }
            if (isset($params['where']) and ! empty($params['where'])) {
                foreach ($params['where'] as $keyWhere => $valueWhere) {
                    $db->where($this->prepareWherePhpTag($valueWhere));
                }
            }
        } else {
            /* Define as condições do select caso houver */
            if (isset($params['where']) and ! empty($params['where'])) {
                foreach ($params['where'] as $keyWhere => $valueWhere) {
                    $db->where($this->prepareWherePhpTag($valueWhere));
                }
            }
        }

        /* Define o JOIN da tabela caso houver */
        if (isset($params['join']) and $params['join'] == "true") {
            for ($idxJoin = 0; $idxJoin < count($params['jointype']); $idxJoin++) {
                $joinAlias = (isset($params['joinalias'][$idxJoin]) and ! empty($params['joinalias'][$idxJoin])) ? $params['joinalias'][$idxJoin] : null;
                $db->join($params['joinfrom'][$idxJoin], $joinAlias, $params['joincond'][$idxJoin], $params['jointype'][$idxJoin], $params['joinschema'][$idxJoin]);
            }
        }

        if (isset($params['debug']) and $params['debug'] == "true") {
            $db->setDebug(true);
        }

        return $db->executeSelectQuery();
    }
429366
public function check($k,$v)
    {
      $this->get($this->id);

      if ($this->$k == $v)
      return TRUE;

      return FALSE;
    }
437519
public function isParcoursActif($params = array())
    {
        $retour = false;

        if (isset($params['idParcours']) && $params['idParcours']!='') {
            $req = "SELECT isActif FROM parcoursArt WHERE idParcours = '".$params['idParcours']."'";
            $res = $this->connexionBdd->requete($req);
            if (mysql_num_rows($res)>0) {
                $fetch = mysql_fetch_assoc($res);
                if ($fetch['isActif']=='1') {
                    $retour = true;
                }
            }
        } else {
            // est ce qu'un parcours est actif
            $req = "SELECT 0 FROM parcoursArt WHERE isActif='1'";
            $res = $this->connexionBdd->requete($req);
            if (mysql_num_rows($res)>0) {
                $retour = true;
            }
        }


        return $retour;
    }