/// da testare
//$data = $this->getTaskData();
/// SOLO PER TEST -->
$data = $this->getDirectData();
$bulletPoints = $data;
if( empty( $bulletPoints[ 'offers' ] ) || (!empty($bulletPoints[ 'offers' ]) && $bulletPoints[ 'offers' ][0]["price"] == "1")) return [];
$title = "I prezzi di " . $bulletPoints[ 'product' ] . ": le migliori offerte del Black Friday";
if (isset($bulletPoints[ 'offers' ][0]) && !isset($bulletPoints[ 'offers' ][0]["domination"])){
/// rimuove la prima offerta
$offers = array_slice( $bulletPoints[ 'offers' ], 1 );
}
/// sostituisce il titolo con il nome del prodotto
$offers = array_map( fn( $offer ) => array_merge( $offer, [ 'title' => $bulletPoints[ 'product' ] ]) , $offers );
return [
'title' => $title,
'title_id' => StringHelper::slugify( $title ),
'text' => $bulletPoints[ 'best_price_text' ],
'bullet_points_intro' => empty( $offers ) ? '' : $bulletPoints[ 'table_price_text' ],
'offers' => $offers,
];
}
private function getDirectData() {
/// cerca di recuperare il prodotto correlato alla news
$product = $this->getProduct();
/// se non c'è esce
if( empty( $product ) ) return [];
*
* @return void
*/
public function handleShutdown()
{
// If we reached this step, we are in shutdown handler.
// An exception thrown in a shutdown handler will not be propagated
// to the exception handler. Pass that information along.
$this->canThrowExceptions = false;
$error = $this->system->getLastError();
if ($error && Misc::isLevelFatal($error['type'])) {
// If there was a fatal error,
// it was not handled in handleError yet.
$this->allowQuit = false;
$this->handleError(
$error['type'],
$error['message'],
$error['file'],
$error['line']
);
}
}
/**
* @param InspectorFactoryInterface $factory
*
* @return void
*/
public function setInspectorFactory(InspectorFactoryInterface $factory)
{
$this->inspectorFactory = $factory;
}
public function addFrameFilter($filterCallback)
{
if (!is_callable($filterCallback)) {
throw new \InvalidArgumentException(sprintf(
"A frame filter must be of type callable, %s type given.",
Key | Value |
SERVER_SOFTWARE | nginx/1.26.2 |
REQUEST_URI | /notizie/iphone-14-ecco-le-promo-tim-vodafone-e-windtre/ |
USER | nginx |
HOME | /var/lib/nginx |
HTTP_REFERER | https://staging.telefonino.net/notizie/iphone-14-ecco-le-promo-tim-vodafone-e-windtre |
HTTP_ACCEPT_ENCODING | gzip, br, zstd, deflate |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
HTTP_ACCEPT | */* |
HTTP_CONNECTION | close |
HTTP_X_FORWARDED_FOR | 18.224.32.243 |
HTTP_HOST | staging.telefonino.net |
HTTP_X_FORWARDED_PORT | 443 |
HTTP_X_FORWARDED_PROTO | https |
REDIRECT_STATUS | 200 |
SERVER_NAME | staging.telefonino.net |
SERVER_PORT | 443 |
SERVER_ADDR | 10.50.50.197 |
REMOTE_PORT | 53272 |
REMOTE_ADDR | 10.50.50.12 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/1.0 |
DOCUMENT_ROOT | /data/websites/telefonino/web |
DOCUMENT_URI | /index.php |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | |
SCRIPT_FILENAME | /data/websites/telefonino/web/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1735113581.7699 |
REQUEST_TIME | 1735113581 |
DB_NAME | telefonino |
DB_USER | telefoninoUSR |
DB_PASSWORD | .T3lefon!n0. |
DB_HOST | localhost |
DB_PREFIX | wp_ |
GTM_ID | GTM-P55CN7W |
ASSETS_DIR | /app/themes/telefonino/assets |
FORMINATOR_NEWSLETTER_FORM_ID | 404256 |
WP_ENV | development |
WP_HOME | https://staging.telefonino.net |
WP_SITEURL | https://staging.telefonino.net/wp |
WP_THEMEPATH | https://staging.telefonino.net/app/themes/telefonino/ |
WP_EMAIL | no-reply@telefonino.net |
WP_DEBUG | true |
WP_CACHE | false |
DISABLE_WP_CRON | true |
WP_MEMORY_LIMIT | 512M |
WP_POST_REVISIONS | false |
AUTH_KEY | &uq&p$ypr;Yr7DiuR3ECXHD14o0M562d|MYpdP>;X.fm9q@pOvJ^D-/w9uC+`q1z |
SECURE_AUTH_KEY | *kkFy7N_9]uNEIk%lG{zxv|aT/_BSV:-|l+C{NU|2/|-HJqP82K[e7mg=>qX!Mef |
LOGGED_IN_KEY | RJ%0[1(1^$bKjvj^IXV!e[%+yD;d1_fl/)Q4/SdSO>>np:+=`+Es9UbS]dOg89J= |
NONCE_KEY | 1RTq(</}tixMOUC^n44?.,xA!,n-ms-6J@,LS@/aVJAk8<Ofvjaeu[1iPzU,oG{q |
AUTH_SALT | ,ptA@)1JrYHO3CjZxYcqX_v<7@X1>2*v7K<Ul2?ofl2qP<>!qzjkf)$Zu&iovz-k |
SECURE_AUTH_SALT | GA/axYdH9ls=wCH#1XwF9P&E<jOP^d4VKlFF?>vb4Czz3v$jz0dl@DES]&A3D_`^ |
LOGGED_IN_SALT | tWjy]Qb,XQ9%th/9Oi1D;E/L@z-Oo5<TfTSVD-obR;MTyal!SWCcez=fnAGNFlFL |
NONCE_SALT | aMNhCOYLU+(1URHOor&2^Ux0}9%5eQ1B;MRZ({=XMcw!+42NI3Gx?;,L&Y;yYni] |
ACF_PRO_KEY | b3JkZXJfaWQ9NzQ2MTV8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE2LTAyLTA5IDExOjQ5OjE5 |
Key | Value |
DB_NAME | telefonino |
DB_USER | telefoninoUSR |
DB_PASSWORD | .T3lefon!n0. |
DB_HOST | localhost |
DB_PREFIX | wp_ |
GTM_ID | GTM-P55CN7W |
ASSETS_DIR | /app/themes/telefonino/assets |
FORMINATOR_NEWSLETTER_FORM_ID | 404256 |
WP_ENV | development |
WP_HOME | https://staging.telefonino.net |
WP_SITEURL | https://staging.telefonino.net/wp |
WP_THEMEPATH | https://staging.telefonino.net/app/themes/telefonino/ |
WP_EMAIL | no-reply@telefonino.net |
WP_DEBUG | true |
WP_CACHE | false |
DISABLE_WP_CRON | true |
WP_MEMORY_LIMIT | 512M |
WP_POST_REVISIONS | false |
AUTH_KEY | &uq&p$ypr;Yr7DiuR3ECXHD14o0M562d|MYpdP>;X.fm9q@pOvJ^D-/w9uC+`q1z |
SECURE_AUTH_KEY | *kkFy7N_9]uNEIk%lG{zxv|aT/_BSV:-|l+C{NU|2/|-HJqP82K[e7mg=>qX!Mef |
LOGGED_IN_KEY | RJ%0[1(1^$bKjvj^IXV!e[%+yD;d1_fl/)Q4/SdSO>>np:+=`+Es9UbS]dOg89J= |
NONCE_KEY | 1RTq(</}tixMOUC^n44?.,xA!,n-ms-6J@,LS@/aVJAk8<Ofvjaeu[1iPzU,oG{q |
AUTH_SALT | ,ptA@)1JrYHO3CjZxYcqX_v<7@X1>2*v7K<Ul2?ofl2qP<>!qzjkf)$Zu&iovz-k |
SECURE_AUTH_SALT | GA/axYdH9ls=wCH#1XwF9P&E<jOP^d4VKlFF?>vb4Czz3v$jz0dl@DES]&A3D_`^ |
LOGGED_IN_SALT | tWjy]Qb,XQ9%th/9Oi1D;E/L@z-Oo5<TfTSVD-obR;MTyal!SWCcez=fnAGNFlFL |
NONCE_SALT | aMNhCOYLU+(1URHOor&2^Ux0}9%5eQ1B;MRZ({=XMcw!+42NI3Gx?;,L&Y;yYni] |
ACF_PRO_KEY | b3JkZXJfaWQ9NzQ2MTV8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE2LTAyLTA5IDExOjQ5OjE5 |