/var
/www
/clients
/client3
/web1
/web
/private
/andosmilano
/libraries
/Attivita.php
* manages a PHPCraft subject
* @author vuk <http://vuk.bg.it>
*/
namespace Andosmilano;
use PHPCraft\Template\TemplateInterface;
use PHPCraft\Cookie\CookieInterface;
use PHPCraft\Subject\Subject;
class Attivita extends Subject
{
use AndosmilanoTrait;
/**
* exec display
*/
public function execAction()
{
$this->templateParameters['pageTitle'] = $this->translations['frontend']['navigation'][$this->action];
$this->templateParameters['topImage'] = 'attivita.jpg';
parent::execAction();
}
/**
* exec display ELIMINATO 2019/09
*/
/*protected function execProgettoInOut()
{
//render
$this->renderTemplate(sprintf('%s/%s/%s/%s',$this->area, $this->subject, $this->language, $this->action));
}*/
/**
* exec display
*/
protected function execTerapiaDellaRisata()
{
$this->templateParameters['topImage'] = 'terapia-della-risata.png';
//render
/var
/www
/clients
/client3
/web1
/web
/private
/andosmilano
/libraries
/Attivita.php
* manages a PHPCraft subject
* @author vuk <http://vuk.bg.it>
*/
namespace Andosmilano;
use PHPCraft\Template\TemplateInterface;
use PHPCraft\Cookie\CookieInterface;
use PHPCraft\Subject\Subject;
class Attivita extends Subject
{
use AndosmilanoTrait;
/**
* exec display
*/
public function execAction()
{
$this->templateParameters['pageTitle'] = $this->translations['frontend']['navigation'][$this->action];
$this->templateParameters['topImage'] = 'attivita.jpg';
parent::execAction();
}
/**
* exec display ELIMINATO 2019/09
*/
/*protected function execProgettoInOut()
{
//render
$this->renderTemplate(sprintf('%s/%s/%s/%s',$this->area, $this->subject, $this->language, $this->action));
}*/
/**
* exec display
*/
protected function execTerapiaDellaRisata()
{
$this->templateParameters['topImage'] = 'terapia-della-risata.png';
//render
/var
/www
/clients
/client3
/web1
/web
/private
/andosmilano
/procedures
/bootstrap.php
}
if(!in_array(LANGUAGE, $configuration['languages'])) throw new Exception("language not into configured languages");
//load specific area configuration and procedure if needed
if($configuration['areas'][AREA]['configuration']) {
require sprintf('private/%s/configurations/%s.php', APPLICATION, AREA);
}
if($configuration['areas'][AREA]['procedure']) {
require sprintf('private/%s/procedures/%s.php', APPLICATION, AREA);
}
//require subject procedure
$subject = require sprintf('private/%s/procedures/%s/%s.php', APPLICATION, AREA, SUBJECT);
//load specific application and area translations if needed
if($configuration['locale']) {
$subject->addApplicationTranslations('application', 'application.ini');
}
if($configuration['areas'][AREA]['locale']) {
$subject->addApplicationTranslations(AREA, sprintf('%s.ini', AREA));
}
//subject action
$subject->execAction();
} else {
}
//output
// set headers
foreach ($http->response->getHeaders() as $name => $values) {
foreach ($values as $value) {
@header(sprintf('%s: %s', $name, $value), false);
}
}
//check status code
switch($http->response->getStatusCode()) {
case 200:
break;
default:
@header($_SERVER["SERVER_PROTOCOL"]." " . $http->response->getStatusCode());
break;
}
// output body
$http->response = $http->response->withBody($http->stream);
echo $http->response->getBody();
/var
/www
/clients
/client3
/web1
/web
/index.php
<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
//application name and namesapce
define('APPLICATION','andosmilano');
define('APPLICATION_NAMESPACE','Andosmilano');
//bootstrap
require sprintf('private/%s/procedures/bootstrap.php', APPLICATION);