protected function resolveSubParts(\blaze\web\application\BlazeContext $context, $subExpressions, $subBrackets, $expressionString) { if (\blaze\lang\String::isNativeType($expressionString)) { while (preg_match('/\\{([0-9]*)\\}/', $expressionString, $matches) != 0) { $val = $subExpressions[\blaze\lang\Integer::asNative($matches[1])]->getValue($context); $expressionString = str_replace($matches[0], $val, $expressionString); } while (preg_match('/\\(([0-9]*)\\)/', $expressionString, $matches) != 0) { $val = $subBrackets[\blaze\lang\Integer::asNative($matches[1])]->getValue($context); $expressionString = str_replace($matches[0], $val, $expressionString); } } return $expressionString; }
/** * Creates a new ArrayI which uses the parameter as array or size for the Array. * @param array|int|blaze\collections\ArrayI $arrayOrSize */ public function __construct($arrayOrSize) { if (is_array($arrayOrSize)) { $this->objects = $arrayOrSize; $this->size = count($arrayOrSize); } else { if ($arrayOrSize instanceof AbstractArray) { $this->objects = $arrayOrSize->objects; $this->size = $arrayOrSize->size; } else { if ($arrayOrSize instanceof \blaze\collections\ArrayI) { foreach ($arrayOrSize as $obj) { $this->objects[] = $obj; } $this->size = count($this->objects); } else { $this->objects = array(); $this->size = \blaze\lang\Integer::asNative($arrayOrSize); } } } }
public function intValue() { return Integer::asNative($this->value); }
/** * * @param blaze\lang\String|string $scheme * @param blaze\lang\String|string $user * @param blaze\lang\String|string $password * @param blaze\lang\String|string $host * @param int $port * @param blaze\lang\String|string $path * @param blaze\lang\String|string $query * @param blaze\lang\String|string $fragment */ public function __construct($scheme, $user = null, $password = null, $host = null, $port = null, $path = null, $query = null, $fragment = null) { $this->scheme = $scheme !== null ? \blaze\lang\String::asWrapper($scheme) : null; $this->user = $user !== null ? \blaze\lang\String::asWrapper($user) : null; $this->password = $password !== null ? \blaze\lang\String::asWrapper($password) : null; $this->host = $host !== null ? \blaze\lang\String::asWrapper($host) : null; $this->port = $port !== null ? \blaze\lang\Integer::asNative($port) : -1; $this->path = $path !== null ? \blaze\lang\String::asWrapper($path) : null; $this->query = $query !== null ? \blaze\lang\String::asWrapper($query) : null; $this->fragment = $fragment !== null ? \blaze\lang\String::asWrapper($fragment) : null; $this->buildUrl(); }
public function setInt($identifier, $value) { $this->set($identifier, \blaze\lang\Integer::asNative($value), \PDO::PARAM_INT); return $this; }
public function setFetchSize($fetchSize) { $this->checkClosed(); $this->stmt->setAttribute(\PDO::ATTR_PREFETCH, \blaze\lang\Integer::asNative($fetchSize)); }
/** * * @param int $millisecond * @return blaze\util\Date */ public function setMillisecond($millisecond) { $this->millisecond = Integer::asNative($millisecond); if ($this->millisecond < 0) { $this->millisecond = 0; } $this->newTime = true; return $this; }
/** * @return blaze\ds\meta\ColumnMetaData * @param int $identifier */ public function getColumn($identifier) { $meta = $this->pdoStmt->getColumnMeta(\blaze\lang\Integer::asNative($identifier)); return new ColumnMetaDataImpl($this->schema->getTable($meta['table']), $meta['name']); }
public function intValue() { \blaze\lang\Integer::asNative($this->getIntVal()); }
public function toObject(\blaze\web\application\BlazeContext $context, $string) { return Integer::asNative($string); }
public function getInt($identifier) { $this->checkClosed(); $val = $this->get($identifier); if ($val == null) { return null; } return Integer::asNative($val); }
public function writeInt(\int $int) { $int = \blaze\lang\Integer::asNative($int); return $this->out->write(serialize($int)); }