Documentation du code de SPIP et de ses plugins

Mashup Factory

ezmashup_record.php

Ce fichier contient les fonctions d'API des `enregistrements cible` du plugin Mashup Factory.

  • @package SPIP\EZMASHUP\RECORD\API

Table of Contents

Constants

_EZMASHUP_TARGET_SQL_DATE_FIELD_TYPES  = ['DATE']
_EZMASHUP_TARGET_SQL_DATETIME_FIELD_TYPES  = ['DATETIME', 'TIMESTAMP']
_EZMASHUP_TARGET_SQL_NUMERIC_FIELD_TYPES  = ['BIT', 'TINYINT', 'BOOL', 'BOOLEAN', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'FLOAT', 'DOUBLE', 'DECIMAL', 'DEC']
_EZMASHUP_TARGET_SQL_TIME_FIELD_TYPES  = ['TIME']
_EZMASHUP_TARGET_SQL_YEAR_FIELD_TYPES  = ['YEAR']

Functions

record_remplir()  : array<string|int, mixed>
Remplit un enregistrement avec l'ensemble des types de champs configurés dans le feed.
record_initialiser()  : array<string|int, mixed>
Initialise le record d'un dataset cible avec des valeurs par défaut et remplit les champs statiques avec leur valeur finale.
record_normaliser_champs_sql()  : array<string|int, mixed>
Renvoie la description normalisée SQL de la table.

Constants

_EZMASHUP_TARGET_SQL_DATE_FIELD_TYPES

public mixed _EZMASHUP_TARGET_SQL_DATE_FIELD_TYPES = ['DATE']

_EZMASHUP_TARGET_SQL_DATETIME_FIELD_TYPES

public mixed _EZMASHUP_TARGET_SQL_DATETIME_FIELD_TYPES = ['DATETIME', 'TIMESTAMP']

_EZMASHUP_TARGET_SQL_NUMERIC_FIELD_TYPES

public mixed _EZMASHUP_TARGET_SQL_NUMERIC_FIELD_TYPES = ['BIT', 'TINYINT', 'BOOL', 'BOOLEAN', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'FLOAT', 'DOUBLE', 'DECIMAL', 'DEC']

_EZMASHUP_TARGET_SQL_TIME_FIELD_TYPES

public mixed _EZMASHUP_TARGET_SQL_TIME_FIELD_TYPES = ['TIME']

_EZMASHUP_TARGET_SQL_YEAR_FIELD_TYPES

public mixed _EZMASHUP_TARGET_SQL_YEAR_FIELD_TYPES = ['YEAR']

Functions

record_remplir()

Remplit un enregistrement avec l'ensemble des types de champs configurés dans le feed.

record_remplir(array<string|int, mixed> $item_source, array<string|int, mixed> $feed[, null|array<string|int, mixed> &$erreur = [] ]) : array<string|int, mixed>
Parameters
$item_source : array<string|int, mixed>

Description d'un item de la source dont certains champs seront insérés dans l'enregistrement cible

$feed : array<string|int, mixed>

Description complète du feed.

$erreur : null|array<string|int, mixed> = []

Tableau constitutif d'une erreur ou vide si aucune erreur à remonter

Return values
array<string|int, mixed>

Enregistrement de la cible mis à jour ou vide si erreur.

record_initialiser()

Initialise le record d'un dataset cible avec des valeurs par défaut et remplit les champs statiques avec leur valeur finale.

record_initialiser(array<string|int, mixed> $feed[, null|array<string|int, mixed> &$erreur = [] ]) : array<string|int, mixed>
Parameters
$feed : array<string|int, mixed>

Description complète du feed.

$erreur : null|array<string|int, mixed> = []

Tableau constitutif d'une erreur ou vide si aucune erreur à remonter

Return values
array<string|int, mixed>

Enregistrement par défaut de la cible initialisé ou vide si erreur.

record_normaliser_champs_sql()

Renvoie la description normalisée SQL de la table.

record_normaliser_champs_sql(string $table) : array<string|int, mixed>
Parameters
$table : string

Nom de la table SQL sans le préfixe spip_.

Return values
array<string|int, mixed>

Description de la table SQL normalisée.


        
On this page

Search results