sentence1
stringlengths 52
3.87M
| sentence2
stringlengths 1
47.2k
| label
stringclasses 1
value |
---|---|---|
protected function getColsList(string $table): array
{
$schema = $this->conn->getSchemaManager();
$tableDetails = $schema->listTableDetails($table);
// No primary ? Exception !
if ($tableDetails->hasPrimaryKey() === false) {
throw new NeuralyzerConfigurationException("Can't work with $table, it has no primary key.");
}
$primaryKey = $tableDetails->getPrimaryKey()->getColumns()[0];
$cols = $schema->listTableColumns($table);
$colsInfo = [];
foreach ($cols as $col) {
// If the col has to be ignored: just leave
if ($primaryKey === $col->getName() || $this->colIgnored($table, $col->getName())) {
continue;
}
$colsInfo[] = [
'name' => $col->getName(),
'type' => strtolower((string) $col->getType()),
'len' => $col->getLength(),
];
}
return $colsInfo;
} | Get the cols lists from a connection + table
@param string $table
@return array
@throws NeuralyzerConfigurationException | entailment |
protected function getTablesList(): array
{
$schemaManager = $this->conn->getSchemaManager();
$tablesInDB = $schemaManager->listTables();
$tables = [];
foreach ($tablesInDB as $table) {
if ($this->tableIgnored($table->getName())) {
continue;
}
$tables[] = $this->tablesInConf[] = $table->getName();
}
return array_values($tables);
} | Get the table lists from a connection
@return array | entailment |
protected function guessColsAnonType(string $table, array $cols, GuesserInterface $guesser): array
{
$mapping = [];
foreach ($cols as $props) {
$mapping[$props['name']] = $guesser->mapCol($table, $props['name'], $props['type'], $props['len']);
}
return $mapping;
} | Guess the cols with the guesser
@param string $table
@param array $cols
@param GuesserInterface $guesser
@return array | entailment |
protected function tableIgnored(string $table): bool
{
foreach ($this->ignoredTables as $ignoredTable) {
if (preg_match("/^$ignoredTable\$/", $table)) {
return true;
}
}
return false;
} | Check if that table has to be ignored
@param string $table
@return bool | entailment |
public function deleteCharactersCharacterIdFittingsFittingId($characterId, $fittingId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
$this->deleteCharactersCharacterIdFittingsFittingIdWithHttpInfo($characterId, $fittingId, $datasource, $token, $userAgent, $xUserAgent);
} | Operation deleteCharactersCharacterIdFittingsFittingId
Delete fitting
@param int $characterId An EVE character ID (required)
@param int $fittingId ID for a fitting of this character (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | entailment |
public function deleteCharactersCharacterIdFittingsFittingIdAsync($characterId, $fittingId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->deleteCharactersCharacterIdFittingsFittingIdAsyncWithHttpInfo($characterId, $fittingId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation deleteCharactersCharacterIdFittingsFittingIdAsync
Delete fitting
@param int $characterId An EVE character ID (required)
@param int $fittingId ID for a fitting of this character (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdFittings($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdFittingsWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdFittings
Get fittings
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdFittings200Ok[] | entailment |
public function getCharactersCharacterIdFittingsAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdFittingsAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdFittingsAsync
Get fittings
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function postCharactersCharacterIdFittings($characterId, $datasource = 'tranquility', $fitting = null, $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->postCharactersCharacterIdFittingsWithHttpInfo($characterId, $datasource, $fitting, $token, $userAgent, $xUserAgent);
return $response;
} | Operation postCharactersCharacterIdFittings
Create fitting
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param \nullx27\ESI\nullx27\ESI\Models\PostCharactersCharacterIdFittingsFitting $fitting Details about the new fitting (optional)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\PostCharactersCharacterIdFittingsCreated | entailment |
public function postCharactersCharacterIdFittingsAsync($characterId, $datasource = 'tranquility', $fitting = null, $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->postCharactersCharacterIdFittingsAsyncWithHttpInfo($characterId, $datasource, $fitting, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation postCharactersCharacterIdFittingsAsync
Create fitting
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param \nullx27\ESI\nullx27\ESI\Models\PostCharactersCharacterIdFittingsFitting $fitting Details about the new fitting (optional)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function configure(array $params): void
{
$dbHelperClass = DBHelper\DriverGuesser::getDBHelper($params['driver']);
// Set specific options
$params['driverOptions'] = $dbHelperClass::getDriverOptions();
$this->conn = DriverManager::getConnection($params, new DbalConfiguration());
$this->conn->setFetchMode(\Doctrine\DBAL\FetchMode::ASSOCIATIVE);
$this->dbHelper = new $dbHelperClass($this->conn);
} | Set the connection (dependency)
@param array $params
@return void
@throws \Doctrine\DBAL\DBALException | entailment |
public function countResults(string $table): int
{
$queryBuilder = $this->conn->createQueryBuilder();
$rows = $queryBuilder->select('COUNT(1)')->from($table)->execute();
return (int) $rows->fetch(\Doctrine\DBAL\FetchMode::NUMERIC)[0];
} | Do a simple count for a table
@param string $table
@return int | entailment |
public function getPrimaryKey(string $table): string
{
$schema = $this->conn->getSchemaManager();
$tableDetails = $schema->listTableDetails($table);
if ($tableDetails->hasPrimaryKey() === false) {
throw new NeuralyzerException("Can't find a primary key for '{$table}'");
}
return $tableDetails->getPrimaryKey()->getColumns()[0];
} | Identify the primary key for a table
@param string $table
@return string
@throws NeuralyzerException | entailment |
public function getTableCols(string $table): array
{
$schema = $this->conn->getSchemaManager();
$tableCols = $schema->listTableColumns($table);
$cols = [];
foreach ($tableCols as $col) {
$cols[$col->getName()] = [
'length' => $col->getLength(),
'type' => $col->getType(),
'unsigned' => $col->getUnsigned(),
];
}
return $cols;
} | Retrieve columns list for a table with type and length
@param string $table
@return array $cols | entailment |
public function getRawSQL(QueryBuilder $queryBuilder)
{
$sql = $queryBuilder->getSQL();
foreach ($queryBuilder->getParameters() as $parameter => $value) {
$sql = str_replace($parameter, "'$value'", $sql);
}
return $sql;
} | To debug, build the final SQL (can be approximate)
@param QueryBuilder $queryBuilder
@return string | entailment |
public function assertTableExists(string $table): void
{
if ($this->conn->getSchemaManager()->tablesExist([$table]) === false) {
throw new NeuralyzerException("Table $table does not exist");
}
} | Make sure a table exists
@param string $table [description]
@throws NeuralyzerException | entailment |
public function getCondition(string $field, array $fieldConf): string
{
$type = strtolower($fieldConf['type']);
$unsigned = $fieldConf['unsigned'];
$integerCast = $this->getIntegerCast($unsigned);
$condition = "(CASE $field WHEN NULL THEN NULL ELSE :$field END)";
$typeToCast = [
'date' => 'DATE',
'datetime' => 'DATE',
'time' => 'TIME',
'smallint' => $integerCast,
'integer' => $integerCast,
'bigint' => $integerCast,
'float' => 'DECIMAL',
'decimal' => 'DECIMAL',
];
// No cast required
if (!array_key_exists($type, $typeToCast)) {
return $condition;
}
return "CAST($condition AS {$typeToCast[$type]})";
} | Build the condition by casting the value if needed
@param string $field
@param array $fieldConf Various values about the field
@return string | entailment |
public function getEmptyValue(string $type)
{
$type = strtolower($type);
$typeToValue = [
'date' => '1970-01-01',
'datetime' => '1970-01-01 00:00:00',
'time' => '00:00:00',
'smallint' => 0,
'integer' => 0,
'bigint' => 0,
'float' => 0,
'decimal' => 0,
];
// Value is simply an empty string
if (!array_key_exists($type, $typeToValue)) {
return '';
}
return $typeToValue[$type];
} | Gives an empty value according to the field (example : numeric = 0)
@param string $type
@return mixed | entailment |
private function getIntegerCast(bool $unsigned): string
{
$driver = $this->conn->getDriver();
if (strpos($driver->getName(), 'mysql')) {
return $unsigned === true ? 'UNSIGNED' : 'SIGNED';
}
return 'INTEGER';
} | Get the right CAST for an INTEGER
@param bool $unsigned
@return string | entailment |
public function getUniverseBloodlines($datasource = null, $language = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseBloodlinesWithHttpInfo($datasource, $language, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseBloodlines
Get bloodlines
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $language Language to use in the response (optional, default to en-us)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\GetUniverseBloodlines200Ok[] | entailment |
public function getUniverseCategoriesCategoryId($categoryId, $datasource = null, $language = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseCategoriesCategoryIdWithHttpInfo($categoryId, $datasource, $language, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseCategoriesCategoryId
Get item category information
@param int $categoryId An Eve item category ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $language Language to use in the response (optional, default to en-us)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\GetUniverseCategoriesCategoryIdOk | entailment |
public function getUniverseConstellations($datasource = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseConstellationsWithHttpInfo($datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseConstellations
Get constellations
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return int[] | entailment |
public function getUniverseFactions($datasource = null, $language = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseFactionsWithHttpInfo($datasource, $language, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseFactions
Get factions
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $language Language to use in the response (optional, default to en-us)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\GetUniverseFactions200Ok[] | entailment |
public function getUniverseGroups($datasource = null, $page = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseGroupsWithHttpInfo($datasource, $page, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseGroups
Get item groups
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page to query (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return int[] | entailment |
public function getUniverseMoonsMoonId($moonId, $datasource = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseMoonsMoonIdWithHttpInfo($moonId, $datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseMoonsMoonId
Get moon information
@param int $moonId moon_id integer (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\GetUniverseMoonsMoonIdOk | entailment |
public function getUniversePlanetsPlanetId($planetId, $datasource = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniversePlanetsPlanetIdWithHttpInfo($planetId, $datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getUniversePlanetsPlanetId
Get planet information
@param int $planetId planet_id integer (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\GetUniversePlanetsPlanetIdOk | entailment |
public function getUniverseRegions($datasource = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseRegionsWithHttpInfo($datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseRegions
Get regions
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return int[] | entailment |
public function getUniverseStationsStationId($stationId, $datasource = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseStationsStationIdWithHttpInfo($stationId, $datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseStationsStationId
Get station information
@param int $stationId station_id integer (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\GetUniverseStationsStationIdOk | entailment |
public function getUniverseStructures($datasource = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseStructuresWithHttpInfo($datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseStructures
List all public structures
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return int[] | entailment |
public function getUniverseSystemJumps($datasource = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseSystemJumpsWithHttpInfo($datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseSystemJumps
Get system jumps
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\GetUniverseSystemJumps200Ok[] | entailment |
public function getUniverseSystemKills($datasource = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseSystemKillsWithHttpInfo($datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseSystemKills
Get system kills
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\GetUniverseSystemKills200Ok[] | entailment |
public function getUniverseTypes($datasource = null, $page = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseTypesWithHttpInfo($datasource, $page, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseTypes
Get types
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page to query (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return int[] | entailment |
public function getUniverseTypesTypeId($typeId, $datasource = null, $language = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getUniverseTypesTypeIdWithHttpInfo($typeId, $datasource, $language, $userAgent, $xUserAgent);
return $response;
} | Operation getUniverseTypesTypeId
Get type information
@param int $typeId An Eve item type ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $language Language to use in the response (optional, default to en-us)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\GetUniverseTypesTypeIdOk | entailment |
public function postUniverseNames($ids, $datasource = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->postUniverseNamesWithHttpInfo($ids, $datasource, $userAgent, $xUserAgent);
return $response;
} | Operation postUniverseNames
Get names and categories for a set of ID's
@param int[] $ids The ids to resolve (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@return \nullx27\ESI\Models\PostUniverseNames200Ok[] | entailment |
public function first() : ?Post
{
$params = array_merge($this->getParameters(), [
'limit' => 1,
]);
$posts = Timber::get_posts($params, $this->postClass);
if (!is_array($posts)) {
return null;
}
return collect($posts)->first();
} | Get the first Post that matches the current query. If no Post matches then return `null`.
@return Rareloop\Lumberjack\Post|null | entailment |
public function getCharactersCharacterIdAsync($characterId, $datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdAsyncWithHttpInfo($characterId, $datasource, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdAsync
Get character's public information
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdAgentsResearch($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdAgentsResearchWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdAgentsResearch
Get agents research
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdAgentsResearch200Ok[] | entailment |
public function getCharactersCharacterIdAgentsResearchAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdAgentsResearchAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdAgentsResearchAsync
Get agents research
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdBlueprints($characterId, $datasource = 'tranquility', $page = '1', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdBlueprintsWithHttpInfo($characterId, $datasource, $page, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdBlueprints
Get blueprints
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page of results to return (optional, default to 1)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdBlueprints200Ok[] | entailment |
public function getCharactersCharacterIdBlueprintsAsync($characterId, $datasource = 'tranquility', $page = '1', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdBlueprintsAsyncWithHttpInfo($characterId, $datasource, $page, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdBlueprintsAsync
Get blueprints
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page of results to return (optional, default to 1)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdChatChannelsAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdChatChannelsAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdChatChannelsAsync
Get chat channels
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdCorporationhistoryAsync($characterId, $datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdCorporationhistoryAsyncWithHttpInfo($characterId, $datasource, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdCorporationhistoryAsync
Get corporation history
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdFatigue($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdFatigueWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdFatigue
Get jump fatigue
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdFatigueOk | entailment |
public function getCharactersCharacterIdFatigueAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdFatigueAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdFatigueAsync
Get jump fatigue
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdMedalsAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdMedalsAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdMedalsAsync
Get medals
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdNotifications($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdNotificationsWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdNotifications
Get character notifications
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdNotifications200Ok[] | entailment |
public function getCharactersCharacterIdNotificationsAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdNotificationsAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdNotificationsAsync
Get character notifications
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdNotificationsContacts($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdNotificationsContactsWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdNotificationsContacts
Get new contact notifications
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdNotificationsContacts200Ok[] | entailment |
public function getCharactersCharacterIdNotificationsContactsAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdNotificationsContactsAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdNotificationsContactsAsync
Get new contact notifications
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdPortrait($characterId, $datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdPortraitWithHttpInfo($characterId, $datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdPortrait
Get character portraits
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdPortraitOk | entailment |
public function getCharactersCharacterIdPortraitAsync($characterId, $datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdPortraitAsyncWithHttpInfo($characterId, $datasource, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdPortraitAsync
Get character portraits
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdRoles($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdRolesWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdRoles
Get character corporation roles
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdRolesOk | entailment |
public function getCharactersCharacterIdRolesAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdRolesAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdRolesAsync
Get character corporation roles
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdStandingsAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdStandingsAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdStandingsAsync
Get standings
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdStats($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdStatsWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdStats
Yearly aggregate stats
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdStats200Ok[] | entailment |
public function getCharactersCharacterIdStatsAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdStatsAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdStatsAsync
Yearly aggregate stats
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersCharacterIdTitles($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdTitlesWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdTitles
Get character corporation titles
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdTitles200Ok[] | entailment |
public function getCharactersCharacterIdTitlesAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdTitlesAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdTitlesAsync
Get character corporation titles
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCharactersNamesAsync($characterIds, $datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersNamesAsyncWithHttpInfo($characterIds, $datasource, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersNamesAsync
Get character names
@param int[] $characterIds A comma separated list of character IDs (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function postCharactersAffiliation($characters, $datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
list($response) = $this->postCharactersAffiliationWithHttpInfo($characters, $datasource, $userAgent, $xUserAgent);
return $response;
} | Operation postCharactersAffiliation
Character affiliation
@param int[] $characters The character IDs to fetch affiliations for. All characters must exist, or none will be returned. (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\PostCharactersAffiliation200Ok[] | entailment |
public function postCharactersAffiliationAsync($characters, $datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
return $this->postCharactersAffiliationAsyncWithHttpInfo($characters, $datasource, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation postCharactersAffiliationAsync
Character affiliation
@param int[] $characters The character IDs to fetch affiliations for. All characters must exist, or none will be returned. (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function postCharactersCharacterIdCspaAsync($characterId, $characters, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->postCharactersCharacterIdCspaAsyncWithHttpInfo($characterId, $characters, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation postCharactersCharacterIdCspaAsync
Calculate a CSPA charge cost
@param int $characterId An EVE character ID (required)
@param int[] $characters The target characters to calculate the charge for (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function valid()
{
if ($this->container['orderId'] === null) {
return false;
}
if ($this->container['typeId'] === null) {
return false;
}
if ($this->container['regionId'] === null) {
return false;
}
if ($this->container['locationId'] === null) {
return false;
}
if ($this->container['range'] === null) {
return false;
}
$allowedValues = $this->getRangeAllowableValues();
if (!in_array($this->container['range'], $allowedValues)) {
return false;
}
if ($this->container['isBuyOrder'] === null) {
return false;
}
if ($this->container['price'] === null) {
return false;
}
if ($this->container['volumeTotal'] === null) {
return false;
}
if ($this->container['volumeRemain'] === null) {
return false;
}
if ($this->container['issued'] === null) {
return false;
}
if ($this->container['state'] === null) {
return false;
}
$allowedValues = $this->getStateAllowableValues();
if (!in_array($this->container['state'], $allowedValues)) {
return false;
}
if ($this->container['minVolume'] === null) {
return false;
}
if ($this->container['walletDivision'] === null) {
return false;
}
if ($this->container['walletDivision'] > 7) {
return false;
}
if ($this->container['walletDivision'] < 1) {
return false;
}
if ($this->container['duration'] === null) {
return false;
}
if ($this->container['escrow'] === null) {
return false;
}
return true;
} | Validate all the properties in the model
return true if all passed
@return bool True if all properties are valid | entailment |
public function setRange($range)
{
$allowedValues = $this->getRangeAllowableValues();
if (!in_array($range, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'range', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['range'] = $range;
return $this;
} | Sets range
@param string $range Valid order range, numbers are ranges in jumps
@return $this | entailment |
public function setWalletDivision($walletDivision)
{
if (($walletDivision > 7)) {
throw new \InvalidArgumentException('invalid value for $walletDivision when calling GetCorporationsCorporationIdOrders200Ok., must be smaller than or equal to 7.');
}
if (($walletDivision < 1)) {
throw new \InvalidArgumentException('invalid value for $walletDivision when calling GetCorporationsCorporationIdOrders200Ok., must be bigger than or equal to 1.');
}
$this->container['walletDivision'] = $walletDivision;
return $this;
} | Sets walletDivision
@param int $walletDivision Wallet division of which this order used
@return $this | entailment |
public function setTotalUnreadCount($totalUnreadCount)
{
if (!is_null($totalUnreadCount) && ($totalUnreadCount < 0)) {
throw new \InvalidArgumentException('invalid value for $totalUnreadCount when calling GetCharactersCharacterIdMailLabelsOk., must be bigger than or equal to 0.');
}
$this->container['totalUnreadCount'] = $totalUnreadCount;
return $this;
} | Sets totalUnreadCount
@param int $totalUnreadCount total_unread_count integer
@return $this | entailment |
protected function initOptions()
{
Html::addCssClass($this->options, 'uk-alert uk-alert-'.$this->type);
$this->options['uk-alert'] = true;
} | Initializes the widget options.
This method sets the default values for various options. | entailment |
public function getTypeAllowableValues()
{
return [
self::TYPE_ACCEPTED_ALLY,
self::TYPE_ACCEPTED_SURRENDER,
self::TYPE_ALL_ANCHORING_MSG,
self::TYPE_ALL_MAINTENANCE_BILL_MSG,
self::TYPE_ALL_STRUC_INVULNERABLE_MSG,
self::TYPE_ALL_STRUCT_VULNERABLE_MSG,
self::TYPE_ALL_WAR_CORP_JOINED_ALLIANCE_MSG,
self::TYPE_ALL_WAR_DECLARED_MSG,
self::TYPE_ALL_WAR_INVALIDATED_MSG,
self::TYPE_ALL_WAR_RETRACTED_MSG,
self::TYPE_ALL_WAR_SURRENDER_MSG,
self::TYPE_ALLIANCE_CAPITAL_CHANGED,
self::TYPE_ALLY_CONTRACT_CANCELLED,
self::TYPE_ALLY_JOINED_WAR_AGGRESSOR_MSG,
self::TYPE_ALLY_JOINED_WAR_ALLY_MSG,
self::TYPE_ALLY_JOINED_WAR_DEFENDER_MSG,
self::TYPE_BATTLE_PUNISH_FRIENDLY_FIRE,
self::TYPE_BILL_OUT_OF_MONEY_MSG,
self::TYPE_BILL_PAID_CORP_ALL_MSG,
self::TYPE_BOUNTY_CLAIM_MSG,
self::TYPE_BOUNTY_ESS_SHARED,
self::TYPE_BOUNTY_ESS_TAKEN,
self::TYPE_BOUNTY_PLACED_ALLIANCE,
self::TYPE_BOUNTY_PLACED_CHAR,
self::TYPE_BOUNTY_PLACED_CORP,
self::TYPE_BOUNTY_YOUR_BOUNTY_CLAIMED,
self::TYPE_BUDDY_CONNECT_CONTACT_ADD,
self::TYPE_CHAR_APP_ACCEPT_MSG,
self::TYPE_CHAR_APP_REJECT_MSG,
self::TYPE_CHAR_APP_WITHDRAW_MSG,
self::TYPE_CHAR_LEFT_CORP_MSG,
self::TYPE_CHAR_MEDAL_MSG,
self::TYPE_CHAR_TERMINATION_MSG,
self::TYPE_CLONE_ACTIVATION_MSG,
self::TYPE_CLONE_ACTIVATION_MSG2,
self::TYPE_CLONE_MOVED_MSG,
self::TYPE_CLONE_REVOKED_MSG1,
self::TYPE_CLONE_REVOKED_MSG2,
self::TYPE_CONTACT_ADD,
self::TYPE_CONTACT_EDIT,
self::TYPE_CONTAINER_PASSWORD_MSG,
self::TYPE_CORP_ALL_BILL_MSG,
self::TYPE_CORP_APP_ACCEPT_MSG,
self::TYPE_CORP_APP_INVITED_MSG,
self::TYPE_CORP_APP_NEW_MSG,
self::TYPE_CORP_APP_REJECT_CUSTOM_MSG,
self::TYPE_CORP_APP_REJECT_MSG,
self::TYPE_CORP_DIVIDEND_MSG,
self::TYPE_CORP_FRIENDLY_FIRE_DISABLE_TIMER_COMPLETED,
self::TYPE_CORP_FRIENDLY_FIRE_DISABLE_TIMER_STARTED,
self::TYPE_CORP_FRIENDLY_FIRE_ENABLE_TIMER_COMPLETED,
self::TYPE_CORP_FRIENDLY_FIRE_ENABLE_TIMER_STARTED,
self::TYPE_CORP_KICKED,
self::TYPE_CORP_LIQUIDATION_MSG,
self::TYPE_CORP_NEW_CEO_MSG,
self::TYPE_CORP_NEWS_MSG,
self::TYPE_CORP_OFFICE_EXPIRATION_MSG,
self::TYPE_CORP_STRUCT_LOST_MSG,
self::TYPE_CORP_TAX_CHANGE_MSG,
self::TYPE_CORP_VOTE_CEO_REVOKED_MSG,
self::TYPE_CORP_VOTE_MSG,
self::TYPE_CORP_WAR_DECLARED_MSG,
self::TYPE_CORP_WAR_FIGHTING_LEGAL_MSG,
self::TYPE_CORP_WAR_INVALIDATED_MSG,
self::TYPE_CORP_WAR_RETRACTED_MSG,
self::TYPE_CORP_WAR_SURRENDER_MSG,
self::TYPE_CUSTOMS_MSG,
self::TYPE_DECLARE_WAR,
self::TYPE_DISTRICT_ATTACKED,
self::TYPE_DUST_APP_ACCEPTED_MSG,
self::TYPE_ENTOSIS_CAPTURE_STARTED,
self::TYPE_FW_ALLIANCE_KICK_MSG,
self::TYPE_FW_ALLIANCE_WARNING_MSG,
self::TYPE_FW_CHAR_KICK_MSG,
self::TYPE_FW_CHAR_RANK_GAIN_MSG,
self::TYPE_FW_CHAR_RANK_LOSS_MSG,
self::TYPE_FW_CHAR_WARNING_MSG,
self::TYPE_FW_CORP_JOIN_MSG,
self::TYPE_FW_CORP_KICK_MSG,
self::TYPE_FW_CORP_LEAVE_MSG,
self::TYPE_FW_CORP_WARNING_MSG,
self::TYPE_FAC_WAR_CORP_JOIN_REQUEST_MSG,
self::TYPE_FAC_WAR_CORP_JOIN_WITHDRAW_MSG,
self::TYPE_FAC_WAR_CORP_LEAVE_REQUEST_MSG,
self::TYPE_FAC_WAR_CORP_LEAVE_WITHDRAW_MSG,
self::TYPE_FAC_WAR_LP_DISQUALIFIED_EVENT,
self::TYPE_FAC_WAR_LP_DISQUALIFIED_KILL,
self::TYPE_FAC_WAR_LP_PAYOUT_EVENT,
self::TYPE_FAC_WAR_LP_PAYOUT_KILL,
self::TYPE_GAME_TIME_ADDED,
self::TYPE_GAME_TIME_RECEIVED,
self::TYPE_GAME_TIME_SENT,
self::TYPE_GIFT_RECEIVED,
self::TYPE_I_HUB_DESTROYED_BY_BILL_FAILURE,
self::TYPE_INCURSION_COMPLETED_MSG,
self::TYPE_INDUSTRY_TEAM_AUCTION_LOST,
self::TYPE_INDUSTRY_TEAM_AUCTION_WON,
self::TYPE_INFRASTRUCTURE_HUB_BILL_ABOUT_TO_EXPIRE,
self::TYPE_INSURANCE_EXPIRATION_MSG,
self::TYPE_INSURANCE_FIRST_SHIP_MSG,
self::TYPE_INSURANCE_INVALIDATED_MSG,
self::TYPE_INSURANCE_ISSUED_MSG,
self::TYPE_INSURANCE_PAYOUT_MSG,
self::TYPE_JUMP_CLONE_DELETED_MSG1,
self::TYPE_JUMP_CLONE_DELETED_MSG2,
self::TYPE_KILL_REPORT_FINAL_BLOW,
self::TYPE_KILL_REPORT_VICTIM,
self::TYPE_KILL_RIGHT_AVAILABLE,
self::TYPE_KILL_RIGHT_AVAILABLE_OPEN,
self::TYPE_KILL_RIGHT_EARNED,
self::TYPE_KILL_RIGHT_UNAVAILABLE,
self::TYPE_KILL_RIGHT_UNAVAILABLE_OPEN,
self::TYPE_KILL_RIGHT_USED,
self::TYPE_LOCATE_CHAR_MSG,
self::TYPE_MADE_WAR_MUTUAL,
self::TYPE_MERC_OFFERED_NEGOTIATION_MSG,
self::TYPE_MISSION_OFFER_EXPIRATION_MSG,
self::TYPE_MISSION_TIMEOUT_MSG,
self::TYPE_MOONMINING_AUTOMATIC_FRACTURE,
self::TYPE_MOONMINING_EXTRACTION_CANCELLED,
self::TYPE_MOONMINING_EXTRACTION_FINISHED,
self::TYPE_MOONMINING_LASER_FIRED,
self::TYPE_NPC_STANDINGS_GAINED,
self::TYPE_NPC_STANDINGS_LOST,
self::TYPE_OFFERED_SURRENDER,
self::TYPE_OFFERED_TO_ALLY,
self::TYPE_OLD_LSC_MESSAGES,
self::TYPE_OPERATION_FINISHED,
self::TYPE_ORBITAL_ATTACKED,
self::TYPE_ORBITAL_REINFORCED,
self::TYPE_OWNERSHIP_TRANSFERRED,
self::TYPE_REIMBURSEMENT_MSG,
self::TYPE_RESEARCH_MISSION_AVAILABLE_MSG,
self::TYPE_RETRACTS_WAR,
self::TYPE_SEASONAL_CHALLENGE_COMPLETED,
self::TYPE_SOV_ALL_CLAIM_AQUIRED_MSG,
self::TYPE_SOV_ALL_CLAIM_LOST_MSG,
self::TYPE_SOV_COMMAND_NODE_EVENT_STARTED,
self::TYPE_SOV_CORP_BILL_LATE_MSG,
self::TYPE_SOV_CORP_CLAIM_FAIL_MSG,
self::TYPE_SOV_DISRUPTOR_MSG,
self::TYPE_SOV_STATION_ENTERED_FREEPORT,
self::TYPE_SOV_STRUCTURE_DESTROYED,
self::TYPE_SOV_STRUCTURE_REINFORCED,
self::TYPE_SOV_STRUCTURE_SELF_DESTRUCT_CANCEL,
self::TYPE_SOV_STRUCTURE_SELF_DESTRUCT_FINISHED,
self::TYPE_SOV_STRUCTURE_SELF_DESTRUCT_REQUESTED,
self::TYPE_SOVEREIGNTY_IH_DAMAGE_MSG,
self::TYPE_SOVEREIGNTY_SBU_DAMAGE_MSG,
self::TYPE_SOVEREIGNTY_TCU_DAMAGE_MSG,
self::TYPE_STATION_AGGRESSION_MSG1,
self::TYPE_STATION_AGGRESSION_MSG2,
self::TYPE_STATION_CONQUER_MSG,
self::TYPE_STATION_SERVICE_DISABLED,
self::TYPE_STATION_SERVICE_ENABLED,
self::TYPE_STATION_STATE_CHANGE_MSG,
self::TYPE_STORY_LINE_MISSION_AVAILABLE_MSG,
self::TYPE_STRUCTURE_ANCHORING,
self::TYPE_STRUCTURE_COURIER_CONTRACT_CHANGED,
self::TYPE_STRUCTURE_DESTROYED,
self::TYPE_STRUCTURE_FUEL_ALERT,
self::TYPE_STRUCTURE_ITEMS_DELIVERED,
self::TYPE_STRUCTURE_LOST_ARMOR,
self::TYPE_STRUCTURE_LOST_SHIELDS,
self::TYPE_STRUCTURE_ONLINE,
self::TYPE_STRUCTURE_SERVICES_OFFLINE,
self::TYPE_STRUCTURE_UNANCHORING,
self::TYPE_STRUCTURE_UNDER_ATTACK,
self::TYPE_TOWER_ALERT_MSG,
self::TYPE_TOWER_RESOURCE_ALERT_MSG,
self::TYPE_TRANSACTION_REVERSAL_MSG,
self::TYPE_TUTORIAL_MSG,
self::TYPE_WAR_ALLY_OFFER_DECLINED_MSG,
self::TYPE_WAR_SURRENDER_DECLINED_MSG,
self::TYPE_WAR_SURRENDER_OFFER_MSG,
self::TYPE_NOTIFICATION_TYPE_MOONMINING_EXTRACTION_STARTED,
];
} | Gets allowable values of the enum
@return string[] | entailment |
public function getSenderTypeAllowableValues()
{
return [
self::SENDER_TYPE_CHARACTER,
self::SENDER_TYPE_CORPORATION,
self::SENDER_TYPE_ALLIANCE,
self::SENDER_TYPE_FACTION,
self::SENDER_TYPE_OTHER,
];
} | Gets allowable values of the enum
@return string[] | entailment |
public function setSenderType($senderType)
{
$allowedValues = $this->getSenderTypeAllowableValues();
if (!in_array($senderType, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'senderType', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['senderType'] = $senderType;
return $this;
} | Sets senderType
@param string $senderType sender_type string
@return $this | entailment |
public function setAccessorType($accessorType)
{
$allowedValues = $this->getAccessorTypeAllowableValues();
if (!in_array($accessorType, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'accessorType', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['accessorType'] = $accessorType;
return $this;
} | Sets accessorType
@param string $accessorType accessor_type string
@return $this | entailment |
public function getCharactersCharacterIdOrders($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCharactersCharacterIdOrdersWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCharactersCharacterIdOrders
List orders from a character
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCharactersCharacterIdOrders200Ok[] | entailment |
public function getCharactersCharacterIdOrdersAsync($characterId, $datasource = 'tranquility', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCharactersCharacterIdOrdersAsyncWithHttpInfo($characterId, $datasource, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCharactersCharacterIdOrdersAsync
List orders from a character
@param int $characterId An EVE character ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getCorporationsCorporationIdOrders($corporationId, $datasource = 'tranquility', $page = '1', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getCorporationsCorporationIdOrdersWithHttpInfo($corporationId, $datasource, $page, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getCorporationsCorporationIdOrders
List orders from a corporation
@param int $corporationId An EVE corporation ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page of results to return (optional, default to 1)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetCorporationsCorporationIdOrders200Ok[] | entailment |
public function getCorporationsCorporationIdOrdersAsync($corporationId, $datasource = 'tranquility', $page = '1', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getCorporationsCorporationIdOrdersAsyncWithHttpInfo($corporationId, $datasource, $page, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getCorporationsCorporationIdOrdersAsync
List orders from a corporation
@param int $corporationId An EVE corporation ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page of results to return (optional, default to 1)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getMarketsGroups($datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getMarketsGroupsWithHttpInfo($datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getMarketsGroups
Get item groups
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return int[] | entailment |
public function getMarketsGroupsAsync($datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
return $this->getMarketsGroupsAsyncWithHttpInfo($datasource, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getMarketsGroupsAsync
Get item groups
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getMarketsGroupsMarketGroupIdAsync($marketGroupId, $datasource = 'tranquility', $language = 'en-us', $userAgent = null, $xUserAgent = null)
{
return $this->getMarketsGroupsMarketGroupIdAsyncWithHttpInfo($marketGroupId, $datasource, $language, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getMarketsGroupsMarketGroupIdAsync
Get item group information
@param int $marketGroupId An Eve item group ID (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $language Language to use in the response (optional, default to en-us)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getMarketsPrices($datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getMarketsPricesWithHttpInfo($datasource, $userAgent, $xUserAgent);
return $response;
} | Operation getMarketsPrices
List market prices
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetMarketsPrices200Ok[] | entailment |
public function getMarketsPricesAsync($datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
return $this->getMarketsPricesAsyncWithHttpInfo($datasource, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getMarketsPricesAsync
List market prices
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getMarketsRegionIdHistoryAsync($regionId, $typeId, $datasource = 'tranquility', $userAgent = null, $xUserAgent = null)
{
return $this->getMarketsRegionIdHistoryAsyncWithHttpInfo($regionId, $typeId, $datasource, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getMarketsRegionIdHistoryAsync
List historical market statistics in a region
@param int $regionId Return statistics in this region (required)
@param int $typeId Return statistics for this type (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getMarketsRegionIdOrdersAsync($orderType, $regionId, $datasource = 'tranquility', $page = '1', $typeId = null, $userAgent = null, $xUserAgent = null)
{
return $this->getMarketsRegionIdOrdersAsyncWithHttpInfo($orderType, $regionId, $datasource, $page, $typeId, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getMarketsRegionIdOrdersAsync
List orders in a region
@param string $orderType Filter buy/sell orders, return all orders by default. If you query without type_id, we always return both buy and sell orders. (required)
@param int $regionId Return orders in this region (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page of results to return (optional, default to 1)
@param int $typeId Return orders only for this type (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getMarketsRegionIdTypes($regionId, $datasource = 'tranquility', $page = '1', $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getMarketsRegionIdTypesWithHttpInfo($regionId, $datasource, $page, $userAgent, $xUserAgent);
return $response;
} | Operation getMarketsRegionIdTypes
List type IDs relevant to a market
@param int $regionId Return statistics in this region (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page of results to return (optional, default to 1)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return int[] | entailment |
public function getMarketsRegionIdTypesAsync($regionId, $datasource = 'tranquility', $page = '1', $userAgent = null, $xUserAgent = null)
{
return $this->getMarketsRegionIdTypesAsyncWithHttpInfo($regionId, $datasource, $page, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getMarketsRegionIdTypesAsync
List type IDs relevant to a market
@param int $regionId Return statistics in this region (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page of results to return (optional, default to 1)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function getMarketsStructuresStructureId($structureId, $datasource = 'tranquility', $page = '1', $token = null, $userAgent = null, $xUserAgent = null)
{
list($response) = $this->getMarketsStructuresStructureIdWithHttpInfo($structureId, $datasource, $page, $token, $userAgent, $xUserAgent);
return $response;
} | Operation getMarketsStructuresStructureId
List orders in a structure
@param int $structureId Return orders in this structure (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page of results to return (optional, default to 1)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \nullx27\ESI\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \nullx27\ESI\nullx27\ESI\Models\GetMarketsStructuresStructureId200Ok[] | entailment |
public function getMarketsStructuresStructureIdAsync($structureId, $datasource = 'tranquility', $page = '1', $token = null, $userAgent = null, $xUserAgent = null)
{
return $this->getMarketsStructuresStructureIdAsyncWithHttpInfo($structureId, $datasource, $page, $token, $userAgent, $xUserAgent)
->then(
function ($response) {
return $response[0];
}
);
} | Operation getMarketsStructuresStructureIdAsync
List orders in a structure
@param int $structureId Return orders in this structure (required)
@param string $datasource The server name you would like data from (optional, default to tranquility)
@param int $page Which page of results to return (optional, default to 1)
@param string $token Access token to use if unable to set a header (optional)
@param string $userAgent Client identifier, takes precedence over headers (optional)
@param string $xUserAgent Client identifier, takes precedence over User-Agent (optional)
@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface | entailment |
public function toHtml()
{
$this->setMeta("class", "vf__notes");
$this->setConditionalMeta();
$strOutput = "<div{$this->__getMetaString()}>\n";
if (! empty($this->__header)) {
$strOutput .= "<h4{$this->__getLabelMetaString()}>$this->__header</h4>\n";
}
if (! empty($this->__body)) {
if (preg_match("/<p.*?>/", $this->__body) > 0) {
$strOutput .= "{$this->__body}\n";
} else {
$strOutput .= "<p>{$this->__body}</p>\n";
}
}
$strOutput .= "</div>\n";
return $strOutput;
} | Render the Note
@return string Rendered Note | entailment |
protected function createDriver($driver)
{
// We'll check to see if a creator method exists for the given driver. If not we
// will check for a custom driver creator, which allows developers to create
// drivers using their own customized driver creator Closure to create it.
if (isset($this->customCreators[$driver])) {
return $this->callCustomCreator($driver);
} else {
$method = 'create'.Stringy::create($driver)->upperCamelize().'Driver';
if (method_exists($this, $method)) {
return $this->$method();
}
}
throw new InvalidArgumentException("Driver [$driver] not supported.");
} | Create a new driver instance.
@param string $driver
@return mixed
@throws \InvalidArgumentException | entailment |
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('config');
$rootNode
->children()
->scalarNode('guesser')
->info('Set the guesser class')
->defaultValue(Guesser::class)
->cannotBeEmpty()
->end()
->scalarNode('guesser_version')
->info('Set the version of the guesser the conf has been written with')
->defaultValue((new Guesser)->getVersion())
->cannotBeEmpty()
->end()
->scalarNode('language')
->info("Faker's language, make sure all your methods have a translation")
->defaultValue('en_US')
->end()
->arrayNode('entities')
->info("List all entities, theirs cols and actions")
->example('people')
->isRequired()
->requiresAtLeastOneElement()
->prototype('array')
->children()
->scalarNode('action')
->info('Either "update" or "insert" data')
->defaultValue('update')
->validate()
->ifNotInArray(['update', 'insert'])
->thenInvalid('Action is either "update" or "insert"')
->end()
->end()
->scalarNode('delete')
->info('Should we delete data with what is defined in "delete_where" ?')
->setDeprecated('delete and delete_where have been deprecated. Use now pre and post_actions')
->end()
->scalarNode('delete_where')
->cannotBeEmpty()
->info('Condition applied in a WHERE if delete is set to "true"')
->example("'1 = 1'")
->setDeprecated('delete and delete_where have been deprecated. Use now pre and post_actions')
->end()
->arrayNode('cols')
->example([
'first_name' => ['method' => 'firstName'],
'last_name' => ['method' => 'lastName']
])
->requiresAtLeastOneElement()
->prototype('array')
->children()
->scalarNode('method')
->isRequired()
->info('Faker method to use, see doc : https://github.com/fzaninotto/Faker')
->end()
->booleanNode('unique')
->defaultFalse()
->info('Set this option to true to generate unique values for that field (see faker->unique() generator)')
->end()
->arrayNode('params')
->defaultValue([])
->info("Faker's parameters, see Faker's doc")
->prototype('variable')->end()
->end()
->end()
->end()
->end()
->integerNode('limit')
->defaultValue(0)
->info('Limit the number of written records (update or insert). 100 by default for insert')
->min(0)
->end()
->arrayNode('pre_actions')
->defaultValue([])
->normalizeKeys(false)
->info('The list of expressions language actions to executed before neuralyzing. Be careful that "pretend" has no effect here.')
->prototype('scalar')->end()
->end()
->arrayNode('post_actions')
->defaultValue([])
->normalizeKeys(false)
->info('The list of expressions language actions to executed after neuralyzing. Be careful that "pretend" has no effect here.')
->prototype('scalar')->end()
->end()
->end()
->end()
->end()
->end()
;
return $treeBuilder;
} | Validate the configuration
The config structure is something like :
## Root
entities:
## Can be repeated : the name of the table, is an array
accounts:
cols:
## Can be repeated : the name of the field, is an array
name:
method: words # Required: name of the method
params: [8] # Optional: parameters (an array)
@return TreeBuilder | entailment |
public function addComparison($varComparison)
{
$objComparison = null;
if (is_array($varComparison)) {
$varArguments = array_keys($varComparison);
if (isset($varComparison["subject"])) {
// Apparently, this is an associative array
$varArguments = array_values($varComparison);
}
try {
// @todo Replace Reflection with call_user_func_array()
$objReflection = new \ReflectionClass("Comparison");
$objComparison = $objReflection->newInstanceArgs($varArguments);
} catch (\Exception $e) {
throw new \Exception("Failed to add Comparison: " . $e->getMessage(), 1);
}
if (is_object($objComparison)) {
array_push($this->__comparisons, $objComparison);
} else {
throw new \InvalidArgumentException("No valid comparison data supplied in addComparison() method.", 1);
}
} elseif (is_object($varComparison) && get_class($varComparison) === "ValidFormBuilder\\Comparison") {
array_push($this->__comparisons, $varComparison);
} else {
throw new \InvalidArgumentException("No valid comparison data supplied in addComparison() method.", 1);
}
} | Add new comparison to Condition
@param Comparison|array $varComparison Comparison array or Comparison object
@throws \Exception if Reflection couldn't initialize new Comparison object
@throws \InvalidArgumentException if no valid Comparison data is supplied | entailment |
public function isMet($intDynamicPosition = 0)
{
$blnResult = false;
switch ($this->__comparisontype) {
default:
case ValidForm::VFORM_MATCH_ANY:
/* @var $objComparison Comparison */
foreach ($this->__comparisons as $objComparison) {
if ($objComparison->check($intDynamicPosition)) {
$blnResult = true; // One of the comparisons is true, that's good enough.
break;
}
}
break;
case ValidForm::VFORM_MATCH_ALL:
$blnFailed = false;
/* @var $objComparison Comparison */
foreach ($this->__comparisons as $objComparison) {
if (!$objComparison->check($intDynamicPosition)) {
$blnFailed = true;
break;
}
}
$blnResult = !$blnFailed;
break;
}
return $blnResult;
} | Verify if the condition is met
@param int $intDynamicPosition Dynamic position of the field to verify
@return bool True if it is met, false if not
@throws \Exception | entailment |
public function jsonSerialize($intDynamicPosition = null)
{
if (get_class($this->__subject) == "ValidFormBuilder\\GroupField"
|| get_class($this->__subject) == "ValidFormBuilder\\Area"
) {
$identifier = $this->__subject->getId();
} elseif (get_class($this->__subject) == "ValidFormBuilder\\StaticText") {
$identifier = $this->__subject->getMeta("id");
} else {
$identifier = $this->__subject->getName();
if ($intDynamicPosition > 0) {
$identifier = $identifier . "_" . $intDynamicPosition;
}
}
$arrReturn = array(
"subject" => $identifier,
"property" => $this->__property,
"value" => $this->__value,
"comparisonType" => $this->__comparisontype,
"comparisons" => array()
);
/* @var $objComparison \ValidFormBuilder\Comparison */
foreach ($this->__comparisons as $objComparison) {
array_push($arrReturn["comparisons"], $objComparison->jsonSerialize());
}
return $arrReturn;
} | toJson method creates an array representation of the current condition object and all
of it's comparions.
In the future this class should extend the JsonSerializable interface
(http://php.net/manual/en/class.jsonserializable.php). Since this is only
supported in PHP >= 5.4, we now use our own implementation.
@param integer|null $intDynamicPosition
@return array An array representation of this object and it's comparisons. | entailment |
public function getRangeAllowableValues()
{
return [
self::RANGE_STATION,
self::RANGE_REGION,
self::RANGE_SOLARSYSTEM,
self::RANGE__1,
self::RANGE__2,
self::RANGE__3,
self::RANGE__4,
self::RANGE__5,
self::RANGE__10,
self::RANGE__20,
self::RANGE__30,
self::RANGE__40,
];
} | Gets allowable values of the enum
@return string[] | entailment |
public function setRange($range)
{
$allowed_values = array('station', 'region', 'solarsystem', '1', '2', '3', '4', '5', '10', '20', '30', '40');
if ((!in_array($range, $allowed_values))) {
throw new \InvalidArgumentException("Invalid value for 'range', must be one of 'station', 'region', 'solarsystem', '1', '2', '3', '4', '5', '10', '20', '30', '40'");
}
$this->container['range'] = $range;
return $this;
} | Sets range
@param string $range range string
@return $this | entailment |
public function input($type, $name, $value = null, $options = array())
{
if ( ! isset($options['name'])) $options['name'] = $name;
// We will get the appropriate value for the given field. We will look for the
// value in the session for the value in the old input data then we'll look
// in the model instance if one is set. Otherwise we will just use empty.
$id = $this->getIdAttribute($name, $options);
if ( ! in_array($type, $this->skipValueTypes))
{
$value = $this->getValueAttribute($name, $value);
}
// Once we have the type, value, and ID we can merge them into the rest of the
// attributes array so we can convert them into their HTML attribute format
// when creating the HTML element. Then, we will return the entire input.
$merge = compact('type', 'value', 'id');
$options = array_merge($options, $merge);
return '<input'.$this->html->attributes($options).'>';
} | Create a form input field.
@param string $type
@param string $name
@param string $value
@param array $options
@return string | entailment |
public function selectRange($name, $begin, $end, $selected = null, $options = array())
{
$range = array_combine($range = range($begin, $end), $range);
return $this->select($name, $range, $selected, $options);
} | Create a select range field.
@param string $name
@param string $begin
@param string $end
@param string $selected
@param array $options
@return string | entailment |
protected function placeholderOption($display, $selected)
{
$selected = $this->getSelectedValue(null, $selected);
$options = compact('selected');
$options['value'] = '';
return '<option'.$this->html->attributes($options).'>'.e($display).'</option>';
} | Create a placeholder select element option.
@param $display
@param $selected
@return string | entailment |
public function checkbox($name, $value = 1, $checked = null, $options = array())
{
return $this->checkable('checkbox', $name, $value, $checked, $options);
} | Create a checkbox input field.
@param string $name
@param mixed $value
@param bool $checked
@param array $options
@return string | entailment |
protected function getRadioCheckedState($name, $value, $checked)
{
if ($this->missingOldAndModel($name)) return $checked;
return $this->getValueAttribute($name) == $value;
} | Get the check state for a radio input.
@param string $name
@param mixed $value
@param bool $checked
@return bool | entailment |
protected function getModelValueAttribute($name)
{
if (is_object($this->model))
{
return object_get($this->model, $this->transformKey($name));
}
elseif (is_array($this->model))
{
return array_get($this->model, $this->transformKey($name));
}
} | Get the model value that should be assigned to the field.
@param string $name
@return string | entailment |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.