Merge from branch 1.3

This commit is contained in:
Michael RICOIS 2015-09-30 17:30:10 +00:00
commit 43582cbdac
3395 changed files with 478518 additions and 89814 deletions

View File

@ -23,17 +23,16 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
->appendHttpEquiv('Content-Language', 'fr-FR');
$view->headLink()
->appendStylesheet('/libs/qtip/jquery.qtip.css', 'all')
->appendStylesheet('/libs/qtip/jquery.qtip.min.css', 'all')
->appendStylesheet('/libs/tree/themes/default/style.css')
->appendStylesheet('/libs/ui-1.10.3/themes/smoothness/jquery-ui.css', 'all')
->appendStylesheet($pathStyle.'/main.css', 'all');
$view->headScript()
->appendFile('/libs/jquery/jquery-1.10.1.min.js', 'text/javascript')
->appendFile('/libs/jquery/jquery-migrate-1.2.1.min.js', 'text/javascript')
->appendFile('/libs/jquery/jquery-1.11.3.min.js', 'text/javascript')
->appendFile('/libs/jquery/jquery.cookie.js', 'text/javascript')
->appendFile('/libs/ui-1.10.3/jquery-ui.min.js', 'text/javascript')
->appendFile('/libs/qtip/jquery.qtip.js', 'text/javascript')
->appendFile('/libs/qtip/jquery.qtip.min.js', 'text/javascript')
->appendFile($pathScript.'/scripts.js', 'text/javascript');
$view->headTitle()->setSeparator(' - ');

View File

@ -90,6 +90,26 @@ class ComptageController extends Zend_Controller_Action
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
//No contrat define
if ( empty($user->dateContrat) || $user->dateContrat=='0000-00-00 00:00:00' ) {
//If no params are detected, display a message to contact support
$this->view->typeMsg = 'support';
}
//Check dateContrat and calculate end of contrat
else {
$hour = intval(substr($user->dateContrat,11,2));
$min = intval(substr($user->dateContrat,14,2));
$sec = intval(substr($user->dateContrat,17,2));
$month = intval(substr($user->dateContrat,5,2)) + $user->periodContrat;
$day = intval(substr($user->dateContrat,8,2));
$year = intval(substr($user->dateContrat,0,4));
$dateFinContrat = mktime($hour,$min,$sec,$month,$day,$year);
if ( time() > $dateFinContrat ) {
$this->view->typeMsg = 'contrat';
}
}
//Récupération de la session pour le profil et les valeurs du comptage
$fields = new Scores_Fields();
$criteres = $fields->getCriteres();
@ -247,80 +267,107 @@ class ComptageController extends Zend_Controller_Action
$result = $profilsM->fetchRow($sql);
$profil = json_decode($result['criteres'], true);
//No profil, define it
if (count($profil)==0) {
$profil = array('raisonSociale');
}
$extractSql = $extractLabel = array();
//$extractSql[] = "CONCAT(LPAD(siren, 9, '000000000'), LPAD(nic, 5, '00000')) AS siret";
//$extractLabel[] = 'SIRET';
$tabEntete = $tabEnteteLabel = array();
require_once 'Scores/Enrichissement.php';
$enrichissement = new Enrichissement();
$data = $enrichissement->getFields();
foreach ( $data as $key => $item ) {
if (in_array($key, $profil)) {
if ( array_key_exists('sql', $item) ) {
$extractSql[] = $item['sql'];
} else {
$extractSql[] = $item['column'];
}
$extractLabel[] = $item['label'];
}
/*if ( array_key_exists('join', $item) ) {
//Automatic column name .Lib
$joinColumn = $data[$item]['join']['column'];
$colName = $data[$item]['column'].$joinColumn;
$tabEntete[] = $colName;
//label
$extractLabel[] = $data[$item]['join']['label'];
//Sql
$tableAlias = array($data[$item]['column'].'_'.$joinColumn=>$data[$item]['join']['table']);
$extractSql[] = $data[$item]['column'].'_'.$joinColumn.'.'.$joinColumn.' AS '.$colName.',';
$join[]= array($tableAlias,$data[$item]['join']['stat']);
}*/
}
$fields = $enrichissement->getFields();
$columns = array();
$joins = array();
foreach ( $profil as $item ) {
//Get item
if ( array_key_exists($item, $fields) ) {
$field = $fields[$item];
//Définition de l'entete
$tabEnteteLabel[] = $field['label'];
$tabEntete[] = $item;
//Construction de la requete SQL
if ( array_key_exists('sql', $field) ) {
$columns[] = new Zend_Db_Expr($field['sql']);
} else {
$columns[] = $field['column'].' AS '.$item;
}
//Pour les champs de type "code", ajouter le libellé
if ( array_key_exists('join', $field) ) {
$tabEnteteLabel[] = $field['join']['label'];
$joinColumn = $item.'Lib';
$tabEntete[] = $joinColumn;
//Sql
$tableAlias = $item.'L';
$join['name'] = $field['join']['table'].' AS '.$tableAlias;
$join['col'] = $field['join']['column'].' AS '.$joinColumn;
$join['cond'] = $field['join']['cond'];
$joins[] = $join;
}
}
}
$db = Zend_Db_Table::getDefaultAdapter();
$sql = $db->select()
->from(array('jo_act' => 'jo.etablissements_act'), $extractSql);
if($join){
foreach ($join as $params ){
$sql->joinLeft($params[0], $params[1], array());
}
}
$sql = $db->select()->from('jo.etablissements_act', $columns);
$i = 0;
$where = '';
foreach($sirets as $siret) {
if ($i>0) {
$where.=' OR ';
foreach ( $sirets as $siret ) {
if ( $i > 0 ) {
$sql->orWhere("siren='".substr($siret,0,9)."' AND nic='".substr($siret,9,5)."'");
} else {
$sql->where("siren='".substr($siret,0,9)."' AND nic='".substr($siret,9,5)."'");
}
$where.= "(siren='".substr($siret,0,9)."' AND nic='".substr($siret,9,5)."')";
$i++;
}
$sql->where($where);
$result = $db->fetchAll($sql);
$liste = array();
foreach ($result as $l => $line) {
$tmp = array();
foreach($line as $column => $data) {
$valuesPredefine = $enrichissement->getColumnValue($column);
if ($valuesPredefine!==false) {
$tmp[] = $valuesPredefine[$data];
} else {
$tmp[] = $data;
}
}
$liste[] = $tmp;
if (count($joins)) {
foreach ( $joins as $join ) {
$sql->joinLeft($join['name'], $join['cond'], $join['col']);
}
}
try {
$result = $db->fetchAll($sql, null, Zend_Db::FETCH_ASSOC);
} catch(Zend_Db_Exception $e) {
if (APPLICATION_ENV=='development') {
echo $e->getMessage();
echo "<br/>";
echo $sql->__toString();
}
}
$this->view->assign('label', $extractLabel);
$liste = array();
foreach ($result as $i => $tabData) {
//Trier pour la sortie
$tabSortie = array();
foreach($tabEntete as $key) {
//Add static values
if ( array_key_exists($key, $fields) ) {
if ( array_key_exists('values', $fields[$key]) ) {
$values = $fields[$key]['values'];
//Remplace value if exist
if ( array_key_exists($tabData[$key], $values) ) {
$tabData[$key] = $values[$tabData[$key]];
}
}
}
//Order data for CSV file
$tabSortie[] = isset($tabData[$key]) ? $tabData[$key] : '';
}
$liste[] = $tabSortie;
}
Zend_Registry::get('firebug')->info($liste);
$this->view->assign('label', $tabEnteteLabel);
$this->view->assign('liste', $liste);
}
}

View File

@ -14,7 +14,7 @@ class EnrichissementController extends Zend_Controller_Action
public function fileformAction()
{
$this->view->headScript()->appendFile('/libs/form/jquery.form.js', 'text/javascript');
$this->view->headScript()->appendFile('/libs/form/jquery.form.min.js', 'text/javascript');
$this->view->headScript()->appendFile('/themes/default/scripts/jqueryprogressbar.js', 'text/javascript');
$this->view->assign('filesize', ini_get('upload_max_filesize'));
}
@ -151,7 +151,6 @@ class EnrichissementController extends Zend_Controller_Action
//Récupération du profil de l'utilisateur
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$priceLine = $user->priceLine;
//Other profil for this login ?
$profilsM = new Application_Model_CiblageEnrichissementProfils();
@ -207,7 +206,7 @@ class EnrichissementController extends Zend_Controller_Action
$this->view->assign('resultat', $item['resultat']);
$this->view->assign('uniteInsee', $item['uniteInsee']);
//Calcul du prix
// --- Calcul du prix
//@todo : Si le client a déjà payé la redevance INSEE
$prixInsee = $item['uniteInsee']*$redevanceInsee;
$infoInsee = '';
@ -218,58 +217,75 @@ class EnrichissementController extends Zend_Controller_Action
$this->view->prixInsee = round($prixInsee, 2);
$this->view->infoInsee = $infoInsee;
$prix = round($item['resultat'] * $priceLine + $prixInsee, 2);
$prix = round($item['resultat'] * $user->priceLine + $prixInsee, 2);
// --- Dépassement du nombre d'unité max à enrichir
if ( $item['resultat'] > $resultatMax ) {
$this->view->assign('resultatOver', true);
}
//Forfait - Liste des commandes et calcul
elseif ( $user->forfait > 0 ) {
$dateBegin = $user->dateContrat;
$dateEnd = date('YmdHis', mktime(0,0,0,substr($user->dateContrat,5,2)+$user->periodContrat, substr($user->dateContrat,8,2), substr($user->dateContrat,0,4)));
// --- Pas de forfait
elseif ( $user->forfait == 0 ) {
// --- Fichier illimité (avec nombre de lignes max définies)
if ( $user->limitFiles == 0 ) {
// --- Nombres de lignes dépassées
if ( $item['resultat'] > $user->limitLines ) {
$this->view->assign('resultatOver', 'lines');
}
}
// --- Fichier limité (avec nombre de lignes définies)
elseif ( $user->limitFiles > 0 ) {
// --- Nombres de lignes dépassées
if ( $user->limitLines != 0 && $item['resultat'] > $user->limitLines ) {
$this->view->assign('resultatOver', 'lines');
} else {
// --- Nombre de fichier dépassés
$dateBegin = $user->dateContrat;
$dateEnd = date('Y-m-d H:i:s', mktime(0,0,0,substr($user->dateContrat,5,2)+$user->periodContrat, substr($user->dateContrat,8,2), substr($user->dateContrat,0,4)));
try {
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $commandesM->select()->setIntegrityCheck(false)
->from( array('commande' => 'enrichissement_identifiants'), array('id'))
->join( array('critere' => 'ciblage_criteres'), 'critere.id = commande.idCriteres', array())
->where("dateAdded BETWEEN '".$dateBegin."' AND '".$dateEnd."'")
->where('idClient = ?', $user->idClient);
$result = $commandesM->fetchAll($sql);
} catch (Zend_Db_Exception $e) {
echo "Erreur."; /*echo $sql->__toString();*/ exit;
}
if ( count($result)+1 > $user->limitFiles) {
$this->view->assign('resultatOver', 'files');
}
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $commandesM->select()->setIntegrityCheck(false)
->from( array('commande' => 'enrichissement_identifiants'), array('SUM(nbLigneTotales) as total', 'SUM(uniteInsee) as insee'))
->join( array('critere' => 'ciblage_criteres'), 'critere.id = commande.idCriteres', array())
->where("dateAdded BETWEEN '".$dateBegin."' AND '".$dateEnd."'")
->where('idClient = ?', $user->idClient);
$result = $commandesM->fetchRow($sql);
if ($result) {
$total = $result['total'];
$insee = $result['insee'];
$conso = round($total * $priceLine + $insee * $redevanceInsee, 2);
}
$this->view->forfaitRemain = $user->forfait - $conso - $prix;
}
//Fichier illimité (avec nombre de lignes définies)
elseif ( $user->forfait == 0 && $user->limitFiles == 0 ) {
//Nombres de lignes dépassées
if ( $item['resultat'] > $user->limitLines ) {
$this->view->assign('resultatOver', 'lines');
$result = $commandesM->fetchAll($sql);
if ( $result->count()+1 > $user->limitFiles) {
$this->view->assign('resultatOver', 'files');
}
}
}
}
//Fichier limité (avec nombre de lignes définies)
elseif ($user->forfait==0 && $user->limitFiles>0) {
//Nombres de lignes dépassées
if ( $user->limitLines != 0 && $item['resultat'] > $user->limitLines ) {
$this->view->assign('resultatOver', 'lines');
} else {
//Nombre de fichier dépassés
// --- Forfait - Liste des commandes et calcul
else {
if ( $user->priceLine != 0 ) {
$dateBegin = $user->dateContrat;
$dateEnd = date('YmdHis', mktime(0,0,0,substr($user->dateContrat,5,2)+$user->periodContrat, substr($user->dateContrat,8,2), substr($user->dateContrat,0,4)));
$dateEnd = date('YmdHis', mktime(0,0,0,substr($user->dateContrat,5,2)+$user->periodContrat,
substr($user->dateContrat,8,2), substr($user->dateContrat,0,4)));
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $commandesM->select()
$sql = $commandesM->select()->setIntegrityCheck(false)
->from( array('commande' => 'enrichissement_identifiants'), array(
'SUM(nbLigneTotales) as total', 'SUM(uniteInsee) as insee'))
->join( array('critere' => 'ciblage_criteres'), 'critere.id = commande.idCriteres', array())
->where("dateAdded BETWEEN '".$dateBegin."' AND '".$dateEnd."'")
->where('idClient = ?', $user->idClient);
$result = $commandesM->fetchAll($sql);
if ( $result->count()+1 > $user->limitFiles) {
$this->view->assign('resultatOver', 'files');
$result = $commandesM->fetchRow($sql);
if ($result) {
$total = $result['total'];
$insee = $result['insee'];
$conso = round($total * $user->priceLine + $insee * $redevanceInsee, 2);
}
$this->view->forfaitRemain = $user->forfait - $conso - $prix;
$this->view->Paiement = 'LINE';
} else {
$this->view->Paiement = 'FORFAIT';
}
}

View File

@ -193,6 +193,7 @@ class GestionController extends Zend_Controller_Action
'e.nbLigneTotales',
'e.uniteInsee',
"DATE_FORMAT(e.dateAdded, '%Y/%m/%d %H:%i:%s') AS dateAdded",
"DATE_FORMAT(e.dateStart, '%Y/%m/%d %H:%i:%s') AS dateStart",
'e.fichier'
))
->join('ciblage_criteres', 'idCriteres = ciblage_criteres.id', array(
@ -206,6 +207,46 @@ class GestionController extends Zend_Controller_Action
$this->view->commandes = $commandesM->fetchAll($sql)->toArray();
}
/**
* Téléchargement des fichiers créer par les clients pour analyse
*/
public function enrichissementdlAction()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$id = $this->getRequest()->getParam('id');
$table = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $table->select()
->where('id = ?', $id);
$result = $table->fetchRow($sql);
if( !empty($result) ) {
$result = $result->toArray();
$date = substr($result['dateAdded'],0,4).substr($result['dateAdded'],5,2);
$c = Zend_Registry::get('config');
$path = $c->profil->path->data.'/'.$date.'/';
$file = $result['fichier'];
}
$content_type = 'application/csv-tab-delimited-table';
//Envoi du fichier sur la sortie standard
if ( file_exists($path.$file) ) {
header('Content-Transfer-Encoding: none');
header('Content-type: ' . $content_type.'');
header('Content-Length: ' . filesize($path.$file));
header('Content-MD5: ' . base64_encode(md5_file($path.$file)));
header('Content-Disposition: filename="' . basename($path.$file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ini_set('zlib.output_compression', '0');
echo file_get_contents($path.$file);
} else {
echo 'Impossible de charger le fichier.';
}
}
/**
* Load enrichissement batch to complete data
@ -214,7 +255,7 @@ class GestionController extends Zend_Controller_Action
{
$request = $this->getRequest();
$id = $request->getParam('id');
exec('php '.APPLICATION_PATH.'/../batch/enrichissement.php --id '.$id.' &');
exec('php '.APPLICATION_PATH.'/../scripts/jobs/enrichissement.php --id '.$id.' &');
}
/**
@ -518,4 +559,33 @@ class GestionController extends Zend_Controller_Action
}
}
public function consoAction()
{
$request = $this->getRequest();
$idClient= $request->getParam('idClient', null);
$this->view->assign('idClient', $idClient);
// --- Contrat
$paramsM = new Application_Model_CiblageCustomerParams();
$sql = $paramsM->select()->where('idClient = ?', $idClient);
$params = $paramsM->fetchRow($sql);
$contratDebut = new Zend_Date($params->dateContrat, 'yy-MM-dd');
$contratFin = new Zend_Date($params->dateContrat, 'yy-MM-dd');
$contratFin->addMonth($params->periodContrat)->subDay(1);
$this->view->ContratDateDebut = $contratDebut->toString('yyyy-MM-dd');
$this->view->ContratDateFin = $contratFin->toString('yyyy-MM-dd');
// --- Création du tableau pour la consomation
// --- Recherche tous les idProfil - login
// --- Recherche des fichiers pour chaque id
}
}

View File

@ -320,9 +320,13 @@ class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
$session = new Scores_Fields();
$valeur = $session->getCritere($name);
$class = '';
if (array_key_exists('class', $field)) {
$class = $field['class'];
}
$return = '<div class="interval" >';
$return .= '<input class="'.$field['class'].'" type="text" name="'.$name.'1" value="'.$valeur[0].'" /> '.$this->view->translate('à').' ';
$return .= '<input class="'.$field['class'].'" type="text" name="'.$name.'2" value="'.$valeur[1].'" />';
$return .= '<input class="'.$class.'" type="text" name="'.$name.'1" value="'.$valeur[0].'" /> '.$this->view->translate('à').' ';
$return .= '<input class="'.$class.'" type="text" name="'.$name.'2" value="'.$valeur[1].'" />';
$return .= ' <a href="" class="interval" id="'.$name.'">'.$this->view->translate('Valider').'</a>';
$return .= '</div>';

View File

@ -1 +1,9 @@
<?php
<div id="help" style="padding:5px;">
<h2>A propos de</h2>
<p>Pour une demande commercial vous pouvez contacter <a href="mailto:contact@scores-decisions.com">contact@scores-decisions.com</a>.</p>
<p>Pour une demande concernant votre contrat ou l'utilisation, vous pouvez prendre contact avec
<a href="mailto:support@scores-decisions.com">support@scores-decisions.com</a>, en rappelant vos références.</p>
</div>

View File

@ -11,7 +11,7 @@ $("div#<?=$this->key?>").jstree({
"json_data" : {
"data" : <?=$this->regions?>,
"ajax" : {
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'geographiqueajax', 'key'=> $this->key))?>',
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'geographiqueajax', 'key'=> $this->key), 'default', true)?>',
"data" : function(n) { return { id: n.attr ? n.attr("id") : '' , niveau : n.attr ? n.attr("niveau") : 1 }; },
"cache" : true,
}

View File

@ -11,7 +11,7 @@ $("div#<?=$this->key?>").jstree({
"json_data" : {
"data" : <?=$this->formejuridiques?>,
"ajax" : {
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'juridiqueajax', 'key'=> $this->key))?>',
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'juridiqueajax', 'key'=> $this->key), 'default', true)?>',
"data" : function(n)
{
return { id: n.attr ? n.attr("id") : 0 };

View File

@ -11,7 +11,7 @@ $("div#<?=$this->key?>").jstree({
"json_data" : {
"data" : <?=$this->naf?>,
"ajax" : {
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'nafajax', 'key'=> $this->key))?>',
"url" : '<?=$this->url(array('controller'=>'arborescence', 'action'=>'nafajax', 'key'=> $this->key), 'default', true)?>',
"data" : function(n) { return { parent: n.attr ? n.attr("id") : '' , niveau : n.attr ? n.attr("niveau") : 1 }; },
"cache" : true,
}

View File

@ -7,7 +7,7 @@
<table width="100%" style="font-size:10px;">
<tr>
<?php foreach($this->label as $label): ?>
<th style="border-left:1px solid black;padding:2px;"><b><?=$label?></b></th>
<th style="border-left:1px solid black;padding:2px;" nowrap><b><?=$label?></b></th>
<?php endforeach; ?>
</tr>
<?php

View File

@ -1,4 +1,18 @@
<?php if ($this->noSelection) { ?>
<?php if ($this->typeMsg) {?>
<div id="help">
<?php if ($this->typeMsg == 'support') {?>
Les paramètres de votre compte n'ont pas été définis. <br/>Veuillez contacter le <a href="mailto:support@scores-decisions.com">support</a>.
<br/>Par mail : <a href="mailto:support@scores-decisions.com">support@scores-decisions.com</a>
<br/>Ou prendre contact avec votre commercial.
<?php } elseif ($this->typeMsg == 'contrat') {?>
Votre contrat est arrivé à expiration. <br/>Veuillez contacter le <a href="mailto:support@scores-decisions.com">support</a>.
<br/>Par mail : <a href="mailto:support@scores-decisions.com">support@scores-decisions.com</a>
<br/>Ou prendre contact avec votre commercial.
<?php }?>
</div>
<?php } elseif ($this->noSelection) { ?>
Vous n'avez pas sélectionné de critères !
<?php } else {?>
<style>
@ -11,7 +25,7 @@ span.message {
<form method="post" id="save" name="save" action="<?=$this->url(array('controller'=>'comptage', 'action'=>'save'))?>">
<label>Votre référence : </label><input type="text" name="ref" value="<?=$this->reference?>" />
</form>
<span class="message" style="color:#ff0000;"></span>
<br/>
<span class="message">
La saisie d'une référence vous permettra de suivre vos ciblages et vos commandes.<br/>
Les accents et les carractères spéciaux, seront remplacés automatiquement.<br/>
@ -19,7 +33,7 @@ Les espaces seront remplacés par "_"
</span>
</div>
<script type="text/javascript" src="/libs/form/jquery.form.js"></script>
<script type="text/javascript" src="/libs/form/jquery.form.min.js"></script>
<script>
$('#dialog').dialog({
buttons: [ {
@ -34,7 +48,6 @@ buttons: [ {
success: function(data){
if (data.error == 0) {
$('#result').html(data.msg);
//@todo : Voir
$(location).attr('href',data.href);
} else {
$('#result span.message').html(data.msg);

View File

@ -1,4 +1,4 @@
Votre commande a bien été prise en compte sous la référence <?=$this->ref?>
Votre demande a bien été prise en compte sous la référence <?=$this->ref?>
<script>
$('#dialog').dialog({

View File

@ -46,7 +46,7 @@ Vous pouvez prendre contact avec le service commercial.
<table id="enrichissement">
<tr>
<th>Référence de commande</th><th><?=$this->ref?></th>
<th>Référence</th><th><?=$this->ref?></th>
</tr>
<tr><td>Nombre d'unités</td><td><?=number_format($this->resultat, 0, ',', ' ')?></td></tr>
<tr><td>Nombre d'unités Insee</td><td><?=number_format($this->uniteInsee, 0, ',', ' ')?></td></tr>

View File

@ -14,7 +14,7 @@ $Years = date('Y') - $YearBegin;
<select name="month">
<?php for ( $i=1 ; $i<=12 ; $i++ ) {?>
<?php $select=''; if ($i==$this->month) $select = ' selected';?>
<option value="<?=$i?>"<?=$select?>><?=str_pad($i, 2, '0', STR_PAD_LEFT)?></option>
<option value="<?=str_pad($i, 2, '0', STR_PAD_LEFT)?>"<?=$select?>><?=str_pad($i, 2, '0', STR_PAD_LEFT)?></option>
<?php }?>
</select>
<input type="submit" name="submit" value="Ok"/>

View File

@ -0,0 +1,19 @@
<div id="dashboard">
<div>
<p>Date de contrat : <?=$this->ContratDateDebut?> à <?=$this->ContratDateFin?></p>
</div>
<h2>Consommation</h2>
<div>
<table>
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>

View File

@ -24,7 +24,10 @@
<?=$login?><br/>
<?php }?>
</td>
<td><a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'customerparam', 'idClient'=>$item['idClient']))?>">Détail</a></td>
<td>
<a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'customerparam', 'idClient'=>$item['idClient']))?>">Détail</a>
<a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'conso', 'idClient'=>$item['idClient']))?>">Conso</a>
</td>
</tr>
<?php }?>

View File

@ -13,7 +13,7 @@ $Years = date('Y') - $YearBegin;
<select name="month">
<?php for ( $i=1 ; $i<=12 ; $i++ ) {?>
<?php $select=''; if ($i==$this->month) $select = ' selected';?>
<option value="<?=$i?>"<?=$select?>><?=str_pad($i, 2, '0', STR_PAD_LEFT)?></option>
<option value="<?=str_pad($i, 2, '0', STR_PAD_LEFT)?>"<?=$select?>><?=str_pad($i, 2, '0', STR_PAD_LEFT)?></option>
<?php }?>
</select>
<input type="submit" name="submit" value="Ok"/>
@ -22,25 +22,29 @@ $Years = date('Y') - $YearBegin;
<div>
<table>
<tr>
<th><b>Date de création</b></th>
<th><b>Référence</b></th>
<th><b>Date</b></th>
<th><b>login</b></th>
<th><b>Références</b></th>
<th><b>Résultat</b></th>
<th><b>Insee</b></th>
<th><b>login</b></th>
<th><b>Reférence ciblage</b></th>
<th><b>Fichier</b></th>
</tr>
<?php foreach($this->commandes as $item): ?>
<?php foreach($this->commandes as $item) { ?>
<tr>
<td><?=$item['dateAdded']?></td>
<td><?=$item['commandeReference']?></td>
<td>
<?=$item['dateAdded']?><br/>
<?=$item['dateStart']?>
</td>
<td><?=$item['login']?></td>
<td>
<?=$item['commandeReference']?><br/>
<?=$item['critereReference']?><br/>
<a href="<?=$this->url(array('controller'=>'gestion','action'=>'enrichissementdl', 'id'=> $item['id']),
'default', true)?>"><?=$item['fichier']?></a>
</td>
<td><?=$item['nbLigneTotales']?></td>
<td><?=$item['uniteInsee']?></td>
<td><?=$item['login']?></td>
<td><?=$item['critereReference']?></td>
<td><?=$item['fichier']?></td>
</tr>
<?php endforeach; ?>
<?php } ?>
</table>
</div>
</div>

View File

@ -7,6 +7,4 @@
<h2>Facturation</h2>
<a href="<?=$this->url(array('controller' => 'gestion', 'action' => 'customerparams'))?>">Gestion des paramètres clients</a><br/>
<a href="#">Extraction Logs</a>
</div>

View File

@ -1,5 +1,6 @@
<div id="header-logo">
<div id="logo">
<h1><!-- <a href="./"><img alt="ODEA" src="#"></a> -->Outils D'Extraction Automatique</h1>
<img alt="ODEA" src="/themes/default/images/logos/logo.png" style="float:left;">
<h1>Outils D'Extraction Automatique</h1>
</div>
</div>

View File

@ -24,7 +24,6 @@
<ul>
<li><a href="<?=$this->url(array('controller'=>'index', 'action'=>'index'), null, true)?>"<?php if ($this->menuActive=='accueil') echo ' class="active"';?>><?=$this->translate('Accueil')?></a></li>
<li><a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'), null, true)?>"<?php if ($this->menuActive=='dashboard') echo ' class="active"';?>><?=$this->translate('Tableau de bord')?></a></li>
<li><a href="<?=$this->url(array('controller'=>'aide', 'action'=>'index'), null, true)?>"<?php if ($this->menuActive=='aide') echo ' active';?>><?=$this->translate('Aide')?></a></li>
<li><a href="<?=$this->url(array('controller'=>'aide', 'action'=>'aproposde'), null, true)?>"<?php if ($this->menuActive=='aproposde') echo ' class="active"';?>><?=$this->translate('A propos de')?></a></li>
<?php if ( $this->admin ) {?>
<li><a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'index'), null, true)?>"<?php if ($this->menuActive=='gestion') echo ' class="active"';?>><?=$this->translate('Gestion')?></a></li>

View File

@ -104,34 +104,6 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
}
}
//No contrat define
if ( $identity->dateContrat=='0000-00-00 00:00:00' ) {
//If no params are detected, display a message to contact support
$request->setModuleName('default')
->setControllerName('aide')
->setActionName('message')
->setParam('typeMsg', 'support');
}
//Check dateContrat and calculate end of contrat
else {
$hour = intval(substr($identity->dateContrat,11,2));
$min = intval(substr($identity->dateContrat,14,2));
$sec = intval(substr($identity->dateContrat,17,2));
$month = intval(substr($identity->dateContrat,5,2)) + $identity->periodContrat;
$day = intval(substr($identity->dateContrat,8,2));
$year = intval(substr($identity->dateContrat,0,4));
$dateFinContrat = mktime($hour,$min,$sec,$month,$day,$year);
if ( time() > $dateFinContrat ) {
$request->setModuleName('default')
->setControllerName('user')
->setActionName('logout')
->setParam('message', "Votre Contrat est arrivé à expiration.");
}
}
$auth->getStorage()->write($identity);
if ( $identity->profil=="SuperAdministrateur" ) {

View File

@ -6,22 +6,33 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
protected $_timeout = 1800;
protected $_checkIp = false;
protected $listProxyIp = array(
'62.210.222.34',
);
public function __construct($username, $password, $iponly = false)
{
$this->_username = $username;
$this->_password = $password;
if ($iponly){
$this->_password = 'iponly:'.$_SERVER['REMOTE_ADDR'];
$ip = $_SERVER['REMOTE_ADDR'];
if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && in_array($ip, $this->listProxyIp)) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
$this->_password = 'iponly:'.$ip;
}
$this->_checkIp = $iponly;
}
public function authenticate()
{
$adressIp = $_SERVER['REMOTE_ADDR'];
$ip = $_SERVER['REMOTE_ADDR'];
if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && in_array($ip, $this->listProxyIp)) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
$ws = new Scores_Ws($this->_username, $this->_password);
$InfosLogin = $ws->getInfosLogin($this->_username, $adressIp);
$InfosLogin = $ws->getInfosLogin($this->_username, $ip);
$identity = new stdClass();
$identity->username = $this->_username;
$identity->password = $this->_password;
@ -39,7 +50,7 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
$identity->dateDerniereConnexion = $InfosLogin->result->dateDerniereConnexion;
$identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte;
$identity->dateFinCompte = $InfosLogin->result->dateFinCompte;
$identity->ip = $adressIp;
$identity->ip = $ip;
$identity->modeEdition = false;
$timeout = (!empty($InfosLogin->result->timeout)) ? $InfosLogin->result->timeout : $this->_timeout;
@ -68,7 +79,7 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
. ';' . '195.6.3.0-195.6.3.255' // ORT
. ';' . '217.144.112.0-217.144.116.63' // Coface
;
if ( $this->checkPlagesIp($ipInterdites, $adressIp) ) {
if ( $this->checkPlagesIp($ipInterdites, $ip) ) {
return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_UNCATEGORIZED, $identity);
}

View File

@ -45,7 +45,7 @@ class Ciblage
* First of all we need to load the Sphinx API
* @todo : Make a test and load the right version of API
*/
require_once 'sphinxapi/sphinxapi-2.0.4.php';
require_once 'sphinxapi/sphinxapi-2.2.9.php';
//Load configuration from registry
$c = Zend_Registry::get('config');

View File

@ -1,387 +1,400 @@
<?php
class Enrichissement
{
/**
* Déclaration des colonnes de la table de données pour la transposition
* siren + nic + presentRcs
*/
protected $columns = array(
'id' => array(), //Non utilisé
'source' => array(),
'source_id' => array(),
'triCode' => array(),
'autre_id' => array(),
'siren' => array(), //Obligatoire
'nic' => array(), //Obligatoire
'actif' => array(
'values' => array(
'1' => "actif",
'0' => "inactif",
)
),
'siege' => array(
'values' => array(
'1' => "Etablissement Siege",
'0' => "Etablissement Secondaire",
)
),
'raisonSociale' => array(), //Raison Sociale
'enseigne' => array(), //Enseigne
'sigle' => array(), //Sigle
'identite_pre' => array(), //Identite Précédente
'marques' => array(),
'adr_num' => array(), //Adresse
'adr_btq' => array(), //Adresse
'adr_typeVoie' => array(), //Adresse
'adr_libVoie' => array(), //Adresse
'adr_comp' => array(), //Adresse - Complément
'adr_cp' => array(), //Adresse
'adr_ville' => array(), //Adresse
'adr_dep' => array(), //Département | Code Commune
'adr_com' => array(), //Code Commune
'tel' => array(), //Telephone
'fax' => array(), //Fax
'cj' => array(), //Forme Juridique
'capital' => array(),
'capitalDev' => array(),
'capitalSrc' => array(),
'ape_etab' => array(),
'ape_entrep' => array(),
'age_entrep' => array(),
'age_etab' => array(),
'tca' => array(),
'tcaexp' => array(),
'teff_entrep' => array(
'values' => array(
'NN' => "Unités non employeuses", //@todo : a vérifier NULL dans la base
'0' => "0 salarié",
'1' => "1 ou 2 salariés",
'2' => "3 à 5 salariés",
'3' => "6 à 9 salariés",
'11' => "10 à 19 salariés",
'12' => "20 à 49 salariés",
'21' => "50 à 99 salariés",
'22' => "100 à 199 salariés",
'31' => "200 à 249 salariés",
'32' => "250 à 499 salariés",
'41' => "500 à 999 salariés",
'42' => "1 000 à 1 999 salariés",
'51' => "2 000 à 4 999 salariés",
'52' => "5 000 à 9 999 salariés",
'53' => "10 000 salariés et plus",
),
),
'teff_etab' => array(
'values' => array(
'NN' => "Unités non employeuses", //@todo : a vérifier NULL dans la base
'0' => "0 salarié",
'1' => "1 ou 2 salariés",
'2' => "3 à 5 salariés",
'3' => "6 à 9 salariés",
'11' => "10 à 19 salariés",
'12' => "20 à 49 salariés",
'21' => "50 à 99 salariés",
'22' => "100 à 199 salariés",
'31' => "200 à 249 salariés",
'32' => "250 à 499 salariés",
'41' => "500 à 999 salariés",
'42' => "1 000 à 1 999 salariés",
'51' => "2 000 à 4 999 salariés",
'52' => "5 000 à 9 999 salariés",
'53' => "10 000 salariés et plus",
),
),
'rang' => array(),
'web' => array(),
'mail' => array(),
'adrDom' => array(),
'lieuAct' => array(),
'actifEco' => array(),
'presentRcs' => array(),
'procolHisto' => array(),
'tvaIntraCle' => array(),
'tvaIntraValide' => array(),
'ape4_etab' => array(),
'ape4_entrep' => array(),
'NaceEtab' => array(),
'NaceEntrep' => array(),
'dateCrea_etab' => array(),
'dateCrea_ent' => array(),
'dateImmat' => array(),
'eff_entrep' => array(),
'eff_etab' => array(),
'distSP' => array(),
'achPost' => array(),
'rivoli' => array(),
'dirCiv' => array(),
'dirNom' => array(),
'dirPrenom' => array(),
'dirDateNaiss' => array(),
'dirFct' => array(),
'nbEtab' => array(),
'nbMPubli' => array(),
'sirenGrp' => array(),
'nbActio' => array(),
'nbPart' => array(),
'bilType' => array(
'values' => array(
'1' => 'Inconnus', // I
'2' => 'Réels', // R
'3' => 'Estimés' //E
)
),
'bilAnnee' => array(),
'bilCloture' => array(),
'bilDuree' => array(),
'bilTca' => array(),
'bilEE' => array(),
'bilFL' => array(),
'bilFK' => array(),
'bilFR' => array(),
'bilGF' => array(),
'bilGP' => array(),
'bilGU' => array(),
'bilGW' => array(),
'bilHD' => array(),
'bilHH' => array(),
'bilHL' => array(),
'bilHM' => array(),
'bilHN' => array(),
'bilYP' => array(),
'avisCs' => array(),
);
/**
* Déclaration des champs exportable
* @var array
* @todo : Trier l'ordre des colonnes
*/
protected $fields = array(
'siege' => array(
'label' => "Type d'établissement",
'column' => 'siege',
),
'raisonSociale' => array(
'label' => "Raison Sociale",
'column' => 'raisonSociale'
),
'enseigne' => array(
'label' => "Enseigne",
'column' => 'enseigne'
),
'sigle' => array(
'label' => "Sigle",
'column' => 'sigle'
),
'identite_pre' => array(
'label' => "Identite Précédente",
'column' => 'identite_pre'
),
'marques' => array(
'label' => "Marques déposées",
'column' => 'marques'
),
'adresse' => array(
'label' => 'Adresse',
'column' => 'adresse',
'sql' => "CONCAT_WS(' ', adr_num, adr_btq, adr_typeVoie, adr_libVoie) as adresse",
),
'adr_comp' => array(
'label' => 'Adresse - Complément',
'column' => 'adr_comp',
),
'codepostal' => array(
'label' => 'Code Postal',
'column' => 'adr_cp',
),
'departement' => array(
'label' => 'Département',
'column' => 'adr_dep',
),
'ville' => array(
'label' => 'Ville',
'column' => 'adr_ville',
),
'codecommune' => array(
'label' => 'Code Commune',
'column' => 'codecom',
'sql' => 'CONCAT(adr_dep, adr_com) as codecom',
),
'tel' => array(
'label' => "Téléphone",
'column' => 'tel' ,
'sql' => 'LPAD(tel, 10, 0000000000) AS tel'
),
'fax' => array(
'label' => "Fax",
'column' => 'fax',
'sql' => 'LPAD(fax, 10, 0000000000) AS fax'
),
'cj' => array(
'label' => "Code Forme juridique",
'column' => 'cj',
'join' => array('label'=>'Forme juridique',
'column'=>'libelle',
'table'=>'jo.tabFJur',
'stat'=>'jo.etablissements_act.cj=cj_libelle.code')
),
'dirigeant' => array(
'label' => "Dirigeant",
'column' => 'dirigeant',
'sql' => "CONCAT_WS(' ', dirCiv, dirNom, dirPrenom) AS dirigeant",
),
'dirigeantFct' => array(
'label' => "Dirigeant - Code Fonction",
'column' => 'dirFct',
'join' => array('label'=>'Dirigeant - Libelle Fonction',
'column'=>'libelle',
'table'=>'jo.bodacc_fonctions',
'stat'=>'jo.etablissements_act.dirFct=dirFct_libelle.codeFct')
),
/*'dirigeantFct' => array(
'label' => array("Dirigeant - Code Fonction","Dirigeant - Libelle Fonction"),
'column' => 'libelle',
'sql' => array('dirFct',"jo_fonctions.libelle"),
),*/
'siege' => array(
'label' => "Type d'établissement",
'column' => 'siege',
'values' => array(
'0' => "Etablissement Secondaire",
'1' => "Etablissement Siege",
'2' => "Etablissement Principal",
),
),
'raisonSociale' => array(
'label' => "Raison Sociale",
'column' => 'raisonSociale'
),
'raisonSocialeRncs' => array(
'label' => "Raison Sociale RNCS",
'column' => "raisonSocialeRncs",
),
'nomcommercial' => array(
'label' => "Nom commercial",
'column' => 'nomCommercial',
),
'enseigne' => array(
'label' => "Enseigne",
'column' => 'enseigne'
),
'sigle' => array(
'label' => "Sigle",
'column' => 'sigle'
),
'adresse' => array(
'label' => 'Adresse',
'column' => 'adresse',
'sql' => "CONCAT_WS(' ', adr_num, adr_btq, adr_typeVoie, adr_libVoie) AS adresse",
),
'adr_comp' => array(
'label' => 'Adresse - Complément',
'column' => 'adr_comp',
),
'codepostal' => array(
'label' => 'Code Postal',
'column' => 'adr_cp',
),
'departement' => array(
'label' => 'Département',
'column' => 'adr_dep',
),
'ville' => array(
'label' => 'Ville',
'column' => 'adr_ville',
),
'codecommune' => array(
'label' => 'Code Commune',
'column' => 'codecom',
'sql' => 'CONCAT(adr_dep, adr_com) AS codecommune',
),
'adrDom' => array(
'label' => "Indicateur de domiciliation",
'column' => 'adrDom',
'values' => array(
'0' => "Non",
'1' => "Oui",
)
),
'tel' => array(
'label' => "Téléphone",
'column' => 'tel' ,
'sql' => 'LPAD(tel, 10, 0000000000) AS tel'
),
'fax' => array(
'label' => "Fax",
'column' => 'fax',
'sql' => 'LPAD(fax, 10, 0000000000) AS fax'
),
'mail' => array(
'label' => "Adresse email",
'column' => 'mail',
),
'siteweb' => array(
'label' => "Site web",
'column' => 'web',
),
'creaetab' => array(
'label' => "Date de création de l'établissement",
'column' => 'dateCrea_etab',
'sql' => "IF(dateCrea_etab = 0,'',CONCAT_WS('-',SUBSTRING(dateCrea_etab,0,4),SUBSTRING(dateCrea_etab,4,2),SUBSTRING(dateCrea_etab,6,2))) AS dateCrea_etab",
),
'creaent' => array(
'label' => "Date de création de l'entreprise",
'column' => 'dateCrea_ent',
'sql' => "IF(dateCrea_ent=0,'',CONCAT_WS('-',SUBSTRING(dateCrea_ent,0,4),SUBSTRING(dateCrea_ent,4,2),SUBSTRING(dateCrea_ent,6,2))) AS dateCrea_ent",
),
'dateimmat' => array(
'label' => "Date d'immatriculation de l'entreprise",
'column' => 'dateImmat',
'sql' => "IF(dateImmat=0,'',CONCAT_WS('-',SUBSTRING(dateImmat,0,4),SUBSTRING(dateImmat,4,2),SUBSTRING(dateImmat,6,2))) AS dateImmat",
),
'cj' => array(
'label' => "Code Forme juridique",
'column' => 'cj',
'join' => array(
'label' => 'Forme juridique',
'column' => 'libelle',
'table' => 'jo.tabFJur',
'cond' => 'jo.etablissements_act.cj = cjL.code'
)
),
'nafetablissement' => array(
'label' => "Code NAF Etablissement",
'column' => 'ape_etab',
'join' => array(
'label' => 'NAF Etablissement - Libelle',
'column' => 'libNaf5',
'table' => 'jo.tabNaf5',
'cond' => 'jo.etablissements_act.ape_etab = nafetablissementL.codNaf5'
)
),
'nafentreprise' => array(
'label' => "Code NAF Entreprise",
'column' => 'ape_entrep',
'join' => array(
'label' => 'NAF Entreprise - Libelle',
'column' => 'libNaf5',
'table' => 'jo.tabNaf5',
'cond' => 'jo.etablissements_act.ape_entrep = nafentrepriseL.codNaf5'
)
),
'nbetab' => array(
'label' => "Nombre d'établissements",
'column' => 'nbEtab',
),
'capital' => array(
'label' => "Capital",
'column' => 'capital'
),
'capitaldev' => array(
'label' => "Devise Capital",
'column' => 'capitalDev'
),
'ageentrep' => array(
'label' => "Age de l'entreprise",
'column' => 'age_entrep'
),
'ageetab' => array(
'label' => "Age de l'établissement",
'column' => 'age_etab'
),
'effetablissement' => array(
'label' => "Effectif Etablissement",
'column' => 'eff_etab'
),
'effentreprise' => array(
'label' => "Effectif Entreprise",
'column' => 'eff_entrep'
),
'dirigeantnaiss' => array(
'label' => "Dirigeant - Date de naissance",
'column' => 'dirDateNaiss'
),
'nafetablissement' => array(
'label' => "Code NAF Etablissement",
'column' => 'ape_etab',
'join' => array('Libelle NAF Etablissement',
'column'=>'libNaf5',
'table'=>'jo.tabNaf5',
'stat'=>'jo.etablissements_act.ape_etab=ape_etab_libNaf5.codNaf5')
),
/*'libNaf5_etab' => array(
'label' => "Libelle NAF Etablissement",
'column' => 'ape_etab',
'sql' => "jo_etab.libNaf5 AS etab_libNaf5",
),*/
'nafentreprise' => array(
'label' => "Code NAF Entreprise",
'column' => 'ape_entrep',
'join' => array('Libelle NAF Entreprise',
'column'=>'libNaf5',
'table'=>'jo.tabNaf5',
'stat'=>'jo.etablissements_act.ape_entrep=ape_entrep_libNaf5.codNaf5')
),
/*'libNaf5_entrep' => array(
'label' => "Libelle NAF Entreprise",
'column' => 'ape_entrep',
'sql' => "jo_entrep.libNaf5 AS entrep_libNaf5",
),*/
'effetablissement' => array(
'label' => "Effectif Etablissement",
'column' => 'eff_etab'
),
'effentreprise' => array(
'label' => "Effectif Entreprise",
'column' => 'eff_entrep'
),
'teffetablissement' => array(
'label' => "Code Tranche Effectif Etablissement",
'column' => 'teff_etab'
),
'teffentreprise' => array(
'label' => "Code Tranche Effectif Entreprise",
'column' => 'teff_entrep'
),
'capital' => array(
'label' => "Capital",
'column' => 'capital'
),
'capitaldev' => array(
'label' => "Devise Capital",
'column' => 'capitalDev'
),
'ageentrep' => array(
'label' => "Age de l'entreprise",
'column' => 'age_entrep'
),
'ageetab' => array(
'label' => "Age de l'établissement",
'column' => 'age_etab'
),
//autre_id
//capital
//tca
//tcaexp
'nomcommercial' => array(
'label' => "Nom commercial",
'column' => 'nomCommercial',
),
'siteweb' => array(
'label' => "Site web",
'column' => 'web',
),
'mail' => array(
'label' => "Adresse email",
'column' => 'mail',
),
//adrDom
//lieuAct
//explen
//explet
//actifEco
//procolHisto
//tvaIntraCle
//ape4_etab
//ape4_entrep
//NaceEtab
//NaceEntrep
//dateCrea_etab
//dateCrea_ent
//dateImmat
//distSP
//achPost
//rivoli
//lambert
//zus
//zru
//zfu
//cucs
//zrr
//zafr
'nbetab' => array(
'label' => "Nombre d'établissements",
'column' => 'nbEtab',
),
'nbmpubli' => array(
'label' => "Nombre de marché public remporté",
'column' => 'nbMPubli',
),
'sirengrp' => array(
'label' => "SIREN du groupe",
'column' => 'sirenGrp',
),
'nbactio' => array(
'label' => "Nombre d'actionnaires",
'column' => 'nbActio',
),
'nbpart' => array(
'label' => "Nombre de participations",
'column' => 'nbPart',
),
'bilfl' => array(
'label' => "CA total (FL)",
'column' => 'bilFL',
),
'bilcloture' => array(
'label' => 'Date de clôture du bilan',
'column' => 'bilCloture',
),
'biltype' => array(
'label' => 'Type du bilan',
'column' => 'bilType',
),
//bilAnnee
//bilDuree
//avisCs
//risque
'teffetablissement' => array(
'label' => "Code Tranche Effectif Etablissement",
'column' => 'teff_etab',
'sql' => "IF(teff_etab IS NULL,'NN',teff_etab) AS teff_etab",
'values' => array(
'NN' => "Unités non employeuses", //NN
'0' => "0 salarié",
'1' => "1 ou 2 salariés",
'2' => "3 à 5 salariés",
'3' => "6 à 9 salariés",
'11' => "10 à 19 salariés",
'12' => "20 à 49 salariés",
'21' => "50 à 99 salariés",
'22' => "100 à 199 salariés",
'31' => "200 à 249 salariés",
'32' => "250 à 499 salariés",
'41' => "500 à 999 salariés",
'42' => "1 000 à 1 999 salariés",
'51' => "2 000 à 4 999 salariés",
'52' => "5 000 à 9 999 salariés",
'53' => "10 000 salariés et plus",
),
),
'teffentreprise' => array(
'label' => "Code Tranche Effectif Entreprise",
'column' => 'teff_entrep',
'sql' => "IF(teff_entrep IS NULL,'NN',teff_entrep) AS teff_entrep",
'values' => array(
'NN' => "Unités non employeuses", //NN
'0' => "0 salarié",
'1' => "1 ou 2 salariés",
'2' => "3 à 5 salariés",
'3' => "6 à 9 salariés",
'11' => "10 à 19 salariés",
'12' => "20 à 49 salariés",
'21' => "50 à 99 salariés",
'22' => "100 à 199 salariés",
'31' => "200 à 249 salariés",
'32' => "250 à 499 salariés",
'41' => "500 à 999 salariés",
'42' => "1 000 à 1 999 salariés",
'51' => "2 000 à 4 999 salariés",
'52' => "5 000 à 9 999 salariés",
'53' => "10 000 salariés et plus",
),
),
'dirigeant' => array(
'label' => "Dirigeant",
'column' => 'dirigeant',
'sql' => "CONCAT_WS(' ', dirCiv, dirNom, dirPrenom) AS dirigeant",
),
'dirigeantFct' => array(
'label' => "Dirigeant - Code Fonction",
'column' => 'dirFct',
'join' => array(
'label' => 'Dirigeant - Libelle Fonction',
'column' => 'libelle',
'table' => 'jo.bodacc_fonctions',
'cond' => 'jo.etablissements_act.dirFct = dirigeantFctL.codeFct'
)
),
'dirigeantnaiss' => array(
'label' => "Dirigeant - Date de naissance",
'column' => 'dirDateNaiss'
),
'nbactio' => array(
'label' => "Nombre d'actionnaires",
'column' => 'nbActio',
),
'nbpart' => array(
'label' => "Nombre de participations",
'column' => 'nbPart',
),
'nbmpubli' => array(
'label' => "Nombre de marché public remporté",
'column' => 'nbMPubli',
),
'marques' => array(
'label' => "Marques déposées",
'column' => 'marques'
),
/**
* TCA
*/
'tca' => array(
'label' => "Tranche de chiffre d'affaire",
'column' => 'tca',
'sql' => "IF(tca IS NULL,'',tca) AS tca",
'values' => array(
"" => "Non renseignée",
"0" => "Moins de 0,5 million d'euros",
"1" => "0,5 à moins de 1 million d'euros",
"2" => "1 million à moins de 2 millions d'euros",
"3" => "2 millions à moins de 5 millions d'euros",
"4" => "5 millions à moins de 10 millions d' euros",
"5" => "10 millions à moins de 20 millions d'euros",
"6" => "20 millions à moins de 50 millions d'euros",
"7" => "50 millions à moins de 100 millions d'euros",
"8" => "100 millions à moins de 200 millions d'euros",
"9" => "200 millions d'euros ou plus",
)
),
'bilcloture' => array(
'label' => 'Date de clôture du bilan',
'column' => 'bilCloture',
),
'biltype' => array(
'label' => 'Type du bilan',
'column' => 'bilType',
'values' => array(
'I' => 'Inconnus',
'R' => 'Réels',
'E' => 'Estimés'
)
),
'bilfl' => array(
'label' => "CA total (FL)",
'column' => 'bilFL',
),
'bilhn' => array(
'label' => "Résultat Net (HN)",
'column' => 'bilHN',
),
'bilebe' => array(
'label' => "Excédent brut d'exploitation (EBE)",
'column' => 'bilEBE',
),
'bilyp' => array(
'label' => "Effectif au bilan (YP)",
'column' => 'bilYP',
),
'isin' => array(
'label' => "Code ISIN",
'column' => 'isin',
),
'sirengrp' => array(
'label' => "SIREN du groupe",
'column' => 'sirenGrp',
),
//autre_id
//tcaexp
//adresseL1
//adresseL2
//adresseL3
//adresseL4
//adresseL5
//adresseL6
//adresseL7
//lieuAct
//activNat
//actiSurf
//explen
//explet
//actifEco
//procolHisto
//tvaIntraCle
//tvaIntraValide
//ape4_etab
//ape4_entrep
//NaceEtab
//NaceEntrep
//distSP
//achPost
//codeCommune
//codeIris
//rivoli
//lambert
//zus
//zru
//zfu
//cucs
//zrr
//zafr
//nbCPubli
//nbMarques
//nbAnnAsso
//bilConsoAnnee
//dateExercice
//bilDuree
//bilTca
//bilDL
//bilDU
//bilDO
//bilDU
//bilDX
//bilEE
//bilFK
//bilFR
//bilGF
//bilGP
//bilGU
//bilGW
//bilHD
//bilHH
//bilHL
//bilHM
//dettes
//dureeClients
//dureeFournis
//bilTypeP
//bilAnneeP
//bilClotureP
//bilDureeP
//bilTcaP
//bilDLp
//bilDOp
//bilDUp
//bilDXp
//bilEEp
//bilFLp
//bilFKp
//bilFRp
//bilGFp
//bilGPp
//bilGUp
//bilGWp
//bilHDp
//bilHHp
//bilHLp
//bilHMp
//bilHNp
//bilYPp
//bilEBEp
//dettesP
//dureeClientsP
//dureeFournisP
//avisCs
//typeEven
//dateJugement
//risque
//indiScore20
//encours
);
public function __construct(){}
@ -393,20 +406,20 @@ class Enrichissement
public function getSql($key)
{
if ( array_key_exists($key, $this->columns) ) {
if ( array_key_exists('sql', $this->columns[$key]) ){
return $this->columns[$key]['sql'];
}
}
return false;
if ( array_key_exists($key, $this->fields) ) {
if ( array_key_exists('sql', $this->fields[$key]) ){
return $this->fields[$key]['sql'];
}
}
return false;
}
public function getColumnValue($key)
{
if ( array_key_exists($key, $this->columns) ) {
if ( array_key_exists('values', $this->columns[$key]) && count($this->columns[$key]['values'])>0 ){
return $this->columns[$key]['values'];
if ( array_key_exists($key, $this->fields) ) {
if ( array_key_exists('values', $this->fields[$key]) && count($this->fields[$key]['values'])>0 ){
return $this->fields[$key]['values'];
}
}
return false;

View File

@ -568,29 +568,29 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
'fields' => array(
'selectMultiple' => array(
'value' => array(
'1' => '1 mois',
'2' => '2 mois',
'3' => '3 mois',
'4' => '4 mois',
'5' => '5 mois',
'6' => '6 mois',
'7' => '7 mois',
'8' => '8 mois',
'9' => '9 mois',
'10' => '10 mois',
'11' => '11 mois',
'12' => '12 mois',
'13' => '13 mois',
'14' => '14 mois',
'15' => '15 mois',
'16' => '16 mois',
'17' => '17 mois',
'18' => '18 mois',
'19' => '19 mois',
'20' => '20 mois',
'21' => '21 mois',
'22' => '22 mois',
'23' => '23 mois',
'1' => "1 mois",
'2' => "2 mois",
'3' => "3 mois",
'4' => "4 mois",
'5' => "5 mois",
'6' => "6 mois",
'7' => "7 mois",
'8' => "8 mois",
'9' => "9 mois",
'10' => "10 mois",
'11' => "11 mois",
'12' => "12 mois",
'13' => "13 mois",
'14' => "14 mois",
'15' => "15 mois",
'16' => "16 mois",
'17' => "17 mois",
'18' => "18 mois",
'19' => "19 mois",
'20' => "20 mois",
'21' => "21 mois",
'22' => "22 mois",
'23' => "23 mois",
)
)
),

View File

@ -1,39 +1,69 @@
[local]
webservices.interne.wsdl = "http://webservice-2.4.sd.dev/interne/v0.3?wsdl-auto"
webservices.interne.wsdl = "http://webservice-2.9.sd.dev/interne/v0.6?wsdl-auto"
webservices.interne.options.soap_version = SOAP_1_2
webservices.entreprise.wsdl = "http://webservice-2.4.sd.dev/entreprise/v0.4?wsdl-auto"
webservices.entreprise.wsdl = "http://webservice-2.9.sd.dev/entreprise/v0.8?wsdl-auto"
webservices.entreprise.options.soap_version = SOAP_1_2
webservices.gestion.wsdl = "http://webservice-2.4.sd.dev/gestion/v0.1?wsdl-auto"
webservices.gestion.wsdl = "http://webservice-2.9.sd.dev/gestion/v0.3?wsdl-auto"
webservices.gestion.options.soap_version = SOAP_1_2
webservices.exporter.wsdl = "http://webservice-2.4.sd.dev/exporter/v0.1?wsdl-auto"
webservices.exporter.options.soap_version = SOAP_1_2
webservices.saisie.wsdl = "http://webservice-2.9.sd.dev/saisie/v0.2?wsdl-auto"
webservices.saisie.options.soap_version = SOAP_1_2
webservices.pieces.wsdl = "http://webservice-2.9.sd.dev/pieces/v0.1?wsdl-auto"
webservices.pieces.options.soap_version = SOAP_1_2
webservices.catalog.wsdl = "http://webservice-2.9.sd.dev/catalog/v0.1?wsdl-auto"
webservices.catalog.options.soap_version = SOAP_1_2
[sdsrvdev01]
webservices.interne.wsdl = "http://webservice-2.4.sd.lan/interne/v0.3?wsdl-auto"
webservices.interne.wsdl = "http://webservice-2.8.sd.lan/interne/v0.6?wsdl-auto"
webservices.interne.options.soap_version = SOAP_1_2
webservices.entreprise.wsdl = "http://webservice-2.4.sd.lan/entreprise/v0.4?wsdl-auto"
webservices.entreprise.wsdl = "http://webservice-2.8.sd.lan/entreprise/v0.8?wsdl-auto"
webservices.entreprise.options.soap_version = SOAP_1_2
webservices.gestion.wsdl = "http://webservice-2.4.sd.lan/gestion/v0.1?wsdl-auto"
webservices.gestion.wsdl = "http://webservice-2.8.sd.lan/gestion/v0.3?wsdl-auto"
webservices.gestion.options.soap_version = SOAP_1_2
webservices.exporter.wsdl = "http://webservice-2.4.sd.lan/exporter/v0.1?wsdl-auto"
webservices.exporter.options.soap_version = SOAP_1_2
webservices.saisie.wsdl = "http://webservice-2.8.sd.lan/saisie/v0.2?wsdl-auto"
webservices.saisie.options.soap_version = SOAP_1_2
webservices.pieces.wsdl = "http://webservice-2.8.sd.lan/pieces/v0.1?wsdl-auto"
webservices.pieces.options.soap_version = SOAP_1_2
webservices.catalog.wsdl = "http://webservice-2.8.sd.lan/catalog/v0.1?wsdl-auto"
webservices.catalog.options.soap_version = SOAP_1_2
[sd-25137]
webservices.interne.wsdl = "http://wse.scores-decisions.com:8081/interne/v0.3?wsdl"
webservices.interne.wsdl = "http://wse.scores-decisions.com:8081/interne/v0.6?wsdl"
webservices.interne.options.soap_version = SOAP_1_2
webservices.entreprise.wsdl = "http://wse.scores-decisions.com:8081/entreprise/v0.4?wsdl"
webservices.entreprise.wsdl = "http://wse.scores-decisions.com:8081/entreprise/v0.8?wsdl"
webservices.entreprise.options.soap_version = SOAP_1_2
webservices.gestion.wsdl = "http://wse.scores-decisions.com:8081/gestion/v0.1?wsdl"
webservices.gestion.wsdl = "http://wse.scores-decisions.com:8081/gestion/v0.3?wsdl"
webservices.gestion.options.soap_version = SOAP_1_2
webservices.exporter.wsdl = "http://wse.scores-decisions.com:8081/exporter/v0.1?wsdl"
webservices.exporter.options.soap_version = SOAP_1_2
webservices.saisie.wsdl = "http://wse.scores-decisions.com:8081/saisie/v0.2?wsdl"
webservices.saisie.options.soap_version = SOAP_1_2
webservices.pieces.wsdl = "http://wse.scores-decisions.com:8081/pieces/v0.1?wsdl"
webservices.pieces.options.soap_version = SOAP_1_2
webservices.catalog.wsdl = "http://wse.scores-decisions.com:8081/catalog/v0.1?wsdl-auto"
webservices.catalog.options.soap_version = SOAP_1_2
[celeste]
webservices.interne.wsdl = "http://wse.scores-decisions.com:8081/interne/v0.3?wsdl"
webservices.interne.wsdl = "http://wse.scores-decisions.com:8081/interne/v0.6?wsdl"
webservices.interne.options.soap_version = SOAP_1_2
webservices.entreprise.wsdl = "http://wse.scores-decisions.com:8081/entreprise/v0.4?wsdl"
webservices.entreprise.wsdl = "http://wse.scores-decisions.com:8081/entreprise/v0.8?wsdl"
webservices.entreprise.options.soap_version = SOAP_1_2
webservices.gestion.wsdl = "http://wse.scores-decisions.com:8081/gestion/v0.1?wsdl"
webservices.gestion.wsdl = "http://wse.scores-decisions.com:8081/gestion/v0.3?wsdl"
webservices.gestion.options.soap_version = SOAP_1_2
webservices.exporter.wsdl = "http://wse.scores-decisions.com:8081/exporter/v0.1?wsdl"
webservices.exporter.options.soap_version = SOAP_1_2
webservices.saisie.wsdl = "http://wse.scores-decisions.com:8081/saisie/v0.2?wsdl"
webservices.saisie.options.soap_version = SOAP_1_2
webservices.pieces.wsdl = "http://wse.scores-decisions.com:8081/pieces/v0.1?wsdl"
webservices.pieces.options.soap_version = SOAP_1_2
webservices.catalog.wsdl = "http://wse.scores-decisions.com:8081/catalog/v0.1?wsdl-auto"
webservices.catalog.options.soap_version = SOAP_1_2
[celeste-staging]
webservices.interne.wsdl = "http://wsrec.scores-decisions.com:8000/interne/v0.6?wsdl"
webservices.interne.options.soap_version = SOAP_1_2
webservices.entreprise.wsdl = "http://wsrec.scores-decisions.com:8000/entreprise/v0.8?wsdl"
webservices.entreprise.options.soap_version = SOAP_1_2
webservices.gestion.wsdl = "http://wsrec.scores-decisions.com:8000/gestion/v0.3?wsdl"
webservices.gestion.options.soap_version = SOAP_1_2
webservices.saisie.wsdl = "http://wsrec.scores-decisions.com:8000/saisie/v0.2?wsdl"
webservices.saisie.options.soap_version = SOAP_1_2
webservices.pieces.wsdl = "http://wsrec.scores-decisions.com:8000/pieces/v0.1?wsdl"
webservices.pieces.options.soap_version = SOAP_1_2
webservices.catalog.wsdl = "http://wsrec.scores-decisions.com:8000/catalog/v0.1?wsdl-auto"
webservices.catalog.options.soap_version = SOAP_1_2

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Acl.php 24771 2012-05-07 01:13:06Z adamlundrigan $
* @version $Id$
*/
@ -53,7 +53,7 @@ require_once 'Zend/Acl/Resource.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Interface.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
@ -41,7 +41,7 @@ require_once 'Zend/Acl/Resource/Interface.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Acl_Assert_Interface

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
@ -29,7 +29,7 @@ require_once 'Zend/Exception.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Exception extends Zend_Exception

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Resource.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
@ -29,7 +29,7 @@ require_once 'Zend/Acl/Resource/Interface.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Resource implements Zend_Acl_Resource_Interface
@ -45,7 +45,6 @@ class Zend_Acl_Resource implements Zend_Acl_Resource_Interface
* Sets the Resource identifier
*
* @param string $resourceId
* @return void
*/
public function __construct($resourceId)
{

View File

@ -14,16 +14,16 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Interface.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Acl_Resource_Interface

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Role.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
@ -29,7 +29,7 @@ require_once 'Zend/Acl/Role/Interface.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Role implements Zend_Acl_Role_Interface
@ -45,7 +45,6 @@ class Zend_Acl_Role implements Zend_Acl_Role_Interface
* Sets the Role identifier
*
* @param string $roleId
* @return void
*/
public function __construct($roleId)
{

View File

@ -14,16 +14,16 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Interface.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Acl_Role_Interface

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Registry.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
@ -29,7 +29,7 @@ require_once 'Zend/Acl/Role/Interface.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Role_Registry

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
@ -29,7 +29,7 @@ require_once 'Zend/Acl/Exception.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Role_Registry_Exception extends Zend_Acl_Exception

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Auth.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** @see Zend_Amf_Auth_Abstract */
@ -28,12 +28,15 @@ require_once 'Zend/Acl.php';
/** @see Zend_Auth_Result */
require_once 'Zend/Auth/Result.php';
/** @see Zend_Xml_Security */
require_once 'Zend/Xml/Security.php';
/**
* This class implements authentication against XML file with roles for Flex Builder.
*
* @package Zend_Amf
* @subpackage Adobe
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Adobe_Auth extends Zend_Amf_Auth_Abstract
@ -61,7 +64,7 @@ class Zend_Amf_Adobe_Auth extends Zend_Amf_Auth_Abstract
public function __construct($rolefile)
{
$this->_acl = new Zend_Acl();
$xml = simplexml_load_file($rolefile);
$xml = Zend_Xml_Security::scanFile($rolefile);
/*
Roles file format:
<roles>

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: DbInspector.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -24,7 +24,7 @@
*
* @package Zend_Amf
* @subpackage Adobe
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Adobe_DbInspector

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Introspector.php 25024 2012-07-30 15:08:15Z rob $
* @version $Id$
*/
/** @see Zend_Amf_Parse_TypeLoader */
@ -33,7 +33,7 @@ require_once 'Zend/Server/Reflection.php';
*
* @package Zend_Amf
* @subpackage Adobe
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Adobe_Introspector

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Abstract.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** @see Zend_Auth_Adapter_Interface */
@ -27,7 +27,7 @@ require_once 'Zend/Auth/Adapter/Interface.php';
*
* @package Zend_Amf
* @subpackage Auth
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Amf_Auth_Abstract implements Zend_Auth_Adapter_Interface

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Constants.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -24,7 +24,7 @@
* deserialization to detect the AMF marker and encoding types.
*
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
final class Zend_Amf_Constants

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -26,7 +26,7 @@ require_once 'Zend/Exception.php';
/**
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Exception extends Zend_Exception

View File

@ -15,14 +15,17 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse_Amf0
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Deserializer.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Constants */
require_once 'Zend/Amf/Constants.php';
/** Zend_Xml_Security */
require_once 'Zend/Xml/Security.php';
/** @see Zend_Amf_Parse_Deserializer */
require_once 'Zend/Amf/Parse/Deserializer.php';
@ -33,7 +36,7 @@ require_once 'Zend/Amf/Parse/Deserializer.php';
* @todo Class could be implemented as Factory Class with each data type it's own class
* @package Zend_Amf
* @subpackage Parse_Amf0
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
@ -248,7 +251,7 @@ class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
public function readXmlString()
{
$string = $this->_stream->readLongUTF();
return simplexml_load_string($string);
return Zend_Xml_Security::scan($string); //simplexml_load_string($string);
}
/**

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse_Amf0
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Serializer.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Constants */
@ -32,7 +32,7 @@ require_once 'Zend/Amf/Parse/Serializer.php';
* @uses Zend_Amf_Parse_Serializer
* @package Zend_Amf
* @subpackage Parse_Amf0
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Amf0_Serializer extends Zend_Amf_Parse_Serializer
@ -127,7 +127,7 @@ class Zend_Amf_Parse_Amf0_Serializer extends Zend_Amf_Parse_Serializer
case (is_bool($data)):
$markerType = Zend_Amf_Constants::AMF0_BOOLEAN;
break;
case (is_string($data) && (strlen($data) > 65536)):
case (is_string($data) && (($this->_mbStringFunctionsOverloaded ? mb_strlen($data, '8bit') : strlen($data)) > 65536)):
$markerType = Zend_Amf_Constants::AMF0_LONGSTRING;
break;
case (is_string($data)):

View File

@ -15,14 +15,17 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse_Amf3
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Deserializer.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Parse_Deserializer */
require_once 'Zend/Amf/Parse/Deserializer.php';
/** Zend_Xml_Security */
require_once 'Zend/Xml/Security.php';
/** Zend_Amf_Parse_TypeLoader */
require_once 'Zend/Amf/Parse/TypeLoader.php';
@ -34,7 +37,7 @@ require_once 'Zend/Amf/Parse/TypeLoader.php';
* @todo Class could be implemented as Factory Class with each data type it's own class.
* @package Zend_Amf
* @subpackage Parse_Amf3
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Amf3_Deserializer extends Zend_Amf_Parse_Deserializer
@ -417,6 +420,6 @@ class Zend_Amf_Parse_Amf3_Deserializer extends Zend_Amf_Parse_Deserializer
$xmlReference = $this->readInteger();
$length = $xmlReference >> 1;
$string = $this->_stream->readBytes($length);
return simplexml_load_string($string);
return Zend_Xml_Security::scan($string);
}
}

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse_Amf3
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Serializer.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Constants */
@ -35,7 +35,7 @@ require_once 'Zend/Amf/Parse/TypeLoader.php';
*
* @package Zend_Amf
* @subpackage Parse_Amf3
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Amf3_Serializer extends Zend_Amf_Parse_Serializer
@ -215,7 +215,7 @@ class Zend_Amf_Parse_Amf3_Serializer extends Zend_Amf_Parse_Serializer
* @return Zend_Amf_Parse_Amf3_Serializer
*/
protected function writeBinaryString(&$string){
$ref = strlen($string) << 1 | 0x01;
$ref = ($this->_mbStringFunctionsOverloaded ? mb_strlen($string, '8bit') : strlen($string)) << 1 | 0x01;
$this->writeInteger($ref);
$this->_stream->writeBytes($string);
@ -230,7 +230,7 @@ class Zend_Amf_Parse_Amf3_Serializer extends Zend_Amf_Parse_Serializer
*/
public function writeString(&$string)
{
$len = strlen($string);
$len = $this->_mbStringFunctionsOverloaded ? mb_strlen($string, '8bit') : strlen($string);
if(!$len){
$this->writeInteger(0x01);
return $this;

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Deserializer.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -30,7 +30,7 @@
* @see http://opensource.adobe.com/svn/opensource/blazeds/trunk/modules/core/src/java/flex/messaging/io/amf/
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Amf_Parse_Deserializer

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: InputStream.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Util_BinaryStream */
@ -31,7 +31,7 @@ require_once 'Zend/Amf/Util/BinaryStream.php';
*
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_InputStream extends Zend_Amf_Util_BinaryStream

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: OutputStream.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Util_BinaryStream */
@ -32,7 +32,7 @@ require_once 'Zend/Amf/Util/BinaryStream.php';
* @uses Zend_Amf_Util_BinaryStream
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_OutputStream extends Zend_Amf_Util_BinaryStream

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: MysqlResult.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -26,7 +26,7 @@
*
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Resource_MysqlResult

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: MysqliResult.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -26,7 +26,7 @@
*
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Resource_MysqliResult

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Stream.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -25,7 +25,7 @@
*
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Resource_Stream

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Serializer.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -25,7 +25,7 @@
*
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Amf_Parse_Serializer
@ -37,6 +37,13 @@ abstract class Zend_Amf_Parse_Serializer
*/
protected $_stream;
/**
* str* functions overloaded using mbstring.func_overload
*
* @var bool
*/
protected $mbStringFunctionsOverloaded;
/**
* Constructor
*
@ -46,6 +53,7 @@ abstract class Zend_Amf_Parse_Serializer
public function __construct(Zend_Amf_Parse_OutputStream $stream)
{
$this->_stream = $stream;
$this->_mbStringFunctionsOverloaded = function_exists('mb_strlen') && (ini_get('mbstring.func_overload') !== '') && ((int)ini_get('mbstring.func_overload') & 2);
}
/**

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: TypeLoader.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -47,7 +47,7 @@ require_once 'Zend/Amf/Value/Messaging/RemotingMessage.php';
* @todo PHP 5.3 can drastically change this class w/ namespace and the new call_user_func w/ namespace
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
final class Zend_Amf_Parse_TypeLoader

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Request.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** @see Zend_Amf_Parse_InputStream */
@ -40,7 +40,7 @@ require_once 'Zend/Amf/Value/MessageBody.php';
*
* @todo Currently not checking if the object needs to be Type Mapped to a server object.
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Request

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Request
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Http.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** @see Zend_Amf_Request */
@ -32,7 +32,7 @@ require_once 'Zend/Amf/Request.php';
*
* @package Zend_Amf
* @subpackage Request
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Request_Http extends Zend_Amf_Request

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Response.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** @see Zend_Amf_Constants */
@ -32,7 +32,7 @@ require_once 'Zend/Amf/Parse/Amf0/Serializer.php';
* Handles converting the PHP object ready for response back into AMF
*
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Response

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Response
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Http.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Response */
@ -28,7 +28,7 @@ require_once 'Zend/Amf/Response.php';
*
* @package Zend_Amf
* @subpackage Response
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Response_Http extends Zend_Amf_Response

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Server.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** @see Zend_Server_Interface */
@ -52,7 +52,7 @@ require_once 'Zend/Auth.php';
* @todo Make the reflection methods cache and autoload.
* @package Zend_Amf
* @subpackage Server
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Server implements Zend_Server_Interface

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Server
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Exception */
@ -29,7 +29,7 @@ require_once 'Zend/Amf/Exception.php';
* @category Zend
* @package Zend_Amf
* @subpackage Server
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Server_Exception extends Zend_Amf_Exception

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Util
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: BinaryStream.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -25,7 +25,7 @@
*
* @package Zend_Amf
* @subpackage Util
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Util_BinaryStream
@ -50,6 +50,11 @@ class Zend_Amf_Util_BinaryStream
*/
protected $_needle;
/**
* @var bool str* functions overloaded using mbstring.func_overload?
*/
protected $_mbStringFunctionsOverloaded;
/**
* Constructor
*
@ -69,7 +74,8 @@ class Zend_Amf_Util_BinaryStream
$this->_stream = $stream;
$this->_needle = 0;
$this->_streamLength = strlen($stream);
$this->_mbStringFunctionsOverloaded = function_exists('mb_strlen') && (ini_get('mbstring.func_overload') !== '') && ((int)ini_get('mbstring.func_overload') & 2);
$this->_streamLength = $this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream);
$this->_bigEndian = (pack('l', 1) === "\x00\x00\x00\x01");
}
@ -97,7 +103,7 @@ class Zend_Amf_Util_BinaryStream
require_once 'Zend/Amf/Exception.php';
throw new Zend_Amf_Exception('Buffer underrun at needle position: ' . $this->_needle . ' while requesting length: ' . $length);
}
$bytes = substr($this->_stream, $this->_needle, $length);
$bytes = $this->_mbStringFunctionsOverloaded ? mb_substr($this->_stream, $this->_needle, $length, '8bit') : substr($this->_stream, $this->_needle, $length);
$this->_needle+= $length;
return $bytes;
}
@ -120,12 +126,18 @@ class Zend_Amf_Util_BinaryStream
* Reads a signed byte
*
* @return int Value is in the range of -128 to 127.
* @throws Zend_Amf_Exception
*/
public function readByte()
{
if (($this->_needle + 1) > $this->_streamLength) {
require_once 'Zend/Amf/Exception.php';
throw new Zend_Amf_Exception('Buffer underrun at needle position: ' . $this->_needle . ' while requesting length: ' . $length);
throw new Zend_Amf_Exception(
'Buffer underrun at needle position: '
. $this->_needle
. ' while requesting length: '
. $this->_streamLength
);
}
return ord($this->_stream{$this->_needle++});
@ -184,7 +196,7 @@ class Zend_Amf_Util_BinaryStream
*/
public function writeUtf($stream)
{
$this->writeInt(strlen($stream));
$this->writeInt($this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream));
$this->_stream.= $stream;
return $this;
}
@ -209,7 +221,7 @@ class Zend_Amf_Util_BinaryStream
*/
public function writeLongUtf($stream)
{
$this->writeLong(strlen($stream));
$this->writeLong($this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream));
$this->_stream.= $stream;
}
@ -255,7 +267,7 @@ class Zend_Amf_Util_BinaryStream
*/
public function readDouble()
{
$bytes = substr($this->_stream, $this->_needle, 8);
$bytes = $this->_mbStringFunctionsOverloaded ? mb_substr($this->_stream, $this->_needle, 8, '8bit') : substr($this->_stream, $this->_needle, 8);
$this->_needle+= 8;
if (!$this->_bigEndian) {

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ByteArray.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -25,7 +25,7 @@
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_ByteArray

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: MessageBody.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_MessageBody

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: MessageHeader.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -28,7 +28,7 @@
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_MessageHeader

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AbstractMessage.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -26,7 +26,7 @@
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_Messaging_AbstractMessage

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AcknowledgeMessage.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Value_Messaging_AsyncMessage */
@ -32,7 +32,7 @@ require_once 'Zend/Amf/Value/Messaging/AsyncMessage.php';
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_Messaging_AcknowledgeMessage extends Zend_Amf_Value_Messaging_AsyncMessage

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ArrayCollection.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -27,7 +27,7 @@
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_Messaging_ArrayCollection extends ArrayObject

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AsyncMessage.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
@ -30,7 +30,7 @@ require_once 'Zend/Amf/Value/Messaging/AbstractMessage.php';
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_Messaging_AsyncMessage extends Zend_Amf_Value_Messaging_AbstractMessage

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: CommandMessage.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -36,7 +36,7 @@ require_once 'Zend/Amf/Value/Messaging/AsyncMessage.php';
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_Messaging_CommandMessage extends Zend_Amf_Value_Messaging_AsyncMessage

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ErrorMessage.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** @see Zend_Amf_Value_Messaging_AcknowledgeMessage */
@ -30,7 +30,7 @@ require_once 'Zend/Amf/Value/Messaging/AcknowledgeMessage.php';
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_Messaging_ErrorMessage extends Zend_Amf_Value_Messaging_AcknowledgeMessage

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: RemotingMessage.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/** Zend_Amf_Value_Messaging_AbstractMessage */
@ -31,7 +31,7 @@ require_once 'Zend/Amf/Value/Messaging/AbstractMessage.php';
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_Messaging_RemotingMessage extends Zend_Amf_Value_Messaging_AbstractMessage

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: TraitsInfo.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -25,7 +25,7 @@
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_TraitsInfo

View File

@ -14,15 +14,15 @@
*
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Application.php 25024 2012-07-30 15:08:15Z rob $
* @version $Id$
*/
/**
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application
@ -86,7 +86,10 @@ class Zend_Application
} elseif ($options instanceof Zend_Config) {
$options = $options->toArray();
} elseif (!is_array($options)) {
throw new Zend_Application_Exception('Invalid options provided; must be location of config file, a config object, or an array');
throw new Zend_Application_Exception(
'Invalid options provided; must be location of config file,'
. ' a config object, or an array'
);
}
$this->setOptions($options);
@ -127,11 +130,15 @@ class Zend_Application
if (is_array($options['config'])) {
$_options = array();
foreach ($options['config'] as $tmp) {
$_options = $this->mergeOptions($_options, $this->_loadConfig($tmp));
$_options = $this->mergeOptions(
$_options, $this->_loadConfig($tmp)
);
}
$options = $this->mergeOptions($_options, $options);
} else {
$options = $this->mergeOptions($this->_loadConfig($options['config']), $options);
$options = $this->mergeOptions(
$this->_loadConfig($options['config']), $options
);
}
}
@ -171,7 +178,9 @@ class Zend_Application
$this->setBootstrap($bootstrap);
} elseif (is_array($bootstrap)) {
if (empty($bootstrap['path'])) {
throw new Zend_Application_Exception('No bootstrap path provided');
throw new Zend_Application_Exception(
'No bootstrap path provided'
);
}
$path = $bootstrap['path'];
@ -183,7 +192,9 @@ class Zend_Application
$this->setBootstrap($path, $class);
} else {
throw new Zend_Application_Exception('Invalid bootstrap information provided');
throw new Zend_Application_Exception(
'Invalid bootstrap information provided'
);
}
}
@ -319,13 +330,18 @@ class Zend_Application
if (!class_exists($class, false)) {
require_once $path;
if (!class_exists($class, false)) {
throw new Zend_Application_Exception('Bootstrap class not found');
throw new Zend_Application_Exception(
'Bootstrap class not found'
);
}
}
$this->_bootstrap = new $class($this);
if (!$this->_bootstrap instanceof Zend_Application_Bootstrap_Bootstrapper) {
throw new Zend_Application_Exception('Bootstrap class does not implement Zend_Application_Bootstrap_Bootstrapper');
throw new Zend_Application_Exception(
'Bootstrap class does not implement'
. ' Zend_Application_Bootstrap_Bootstrapper'
);
}
return $this;
@ -403,13 +419,18 @@ class Zend_Application
case 'inc':
$config = include $file;
if (!is_array($config)) {
throw new Zend_Application_Exception('Invalid configuration file provided; PHP file does not return array value');
throw new Zend_Application_Exception(
'Invalid configuration file provided; PHP file does not'
. ' return array value'
);
}
return $config;
break;
default:
throw new Zend_Application_Exception('Invalid configuration file provided; unknown config type');
throw new Zend_Application_Exception(
'Invalid configuration file provided; unknown config type'
);
}
return $config->toArray();

View File

@ -15,11 +15,16 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Bootstrap.php 25073 2012-11-06 19:31:53Z rob $
* @version $Id$
*/
/**
* @see Zend_Application_Bootstrap_BootstrapAbstract
*/
require_once 'Zend/Application/Bootstrap/BootstrapAbstract.php';
/**
* Concrete base class for bootstrap classes
*
@ -29,7 +34,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Bootstrap_Bootstrap
@ -53,16 +58,19 @@ class Zend_Application_Bootstrap_Bootstrap
* Ensure FrontController resource is registered
*
* @param Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
* @return void
*/
public function __construct($application)
{
parent::__construct($application);
if ($application->hasOption('resourceloader')) {
$this->setOptions(array(
'resourceloader' => $application->getOption('resourceloader')
));
$this->setOptions(
array(
'resourceloader' => $application->getOption(
'resourceloader'
)
)
);
}
$this->getResourceLoader();
@ -120,14 +128,18 @@ class Zend_Application_Bootstrap_Bootstrap
public function getResourceLoader()
{
if ((null === $this->_resourceLoader)
&& (false != ($namespace = $this->getAppNamespace()))
&& (false !== ($namespace = $this->getAppNamespace()))
) {
$r = new ReflectionClass($this);
$path = $r->getFileName();
$this->setResourceLoader(new Zend_Application_Module_Autoloader(array(
'namespace' => $namespace,
'basePath' => dirname($path),
)));
$this->setResourceLoader(
new Zend_Application_Module_Autoloader(
array(
'namespace' => $namespace,
'basePath' => dirname($path),
)
)
);
}
return $this->_resourceLoader;
}

View File

@ -15,11 +15,21 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: BootstrapAbstract.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
* @see Zend_Application_Bootstrap_Bootstrapper
*/
require_once 'Zend/Application/Bootstrap/Bootstrapper.php';
/**
* @see Zend_Application_Bootstrap_ResourceBootstrapper
*/
require_once 'Zend/Application/Bootstrap/ResourceBootstrapper.php';
/**
* Abstract base class for bootstrap classes
*
@ -28,7 +38,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Application_Bootstrap_BootstrapAbstract
@ -94,7 +104,6 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
* initializer methods.
*
* @param Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
* @return void
* @throws Zend_Application_Bootstrap_Exception When invalid application is provided
*/
public function __construct($application)
@ -317,8 +326,9 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
/**
* Get a registered plugin resource
*
* @param string $resourceName
* @param string $resource
* @return Zend_Application_Resource_Resource
* @throws Zend_Application_Bootstrap_Exception
*/
public function getPluginResource($resource)
{
@ -431,6 +441,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
*
* @param Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
* @return Zend_Application_Bootstrap_BootstrapAbstract
* @throws Zend_Application_Bootstrap_Exception
*/
public function setApplication($application)
{
@ -481,6 +492,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
*
* @param object $container
* @return Zend_Application_Bootstrap_BootstrapAbstract
* @throws Zend_Application_Bootstrap_Exception
*/
public function setContainer($container)
{
@ -544,7 +556,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
}
/**
* Implement PHP's magic to retrieve a ressource
* Implement PHP's magic to retrieve a resource
* in the bootstrap
*
* @param string $prop
@ -557,7 +569,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
/**
* Implement PHP's magic to ask for the
* existence of a ressource in the bootstrap
* existence of a resource in the bootstrap
*
* @param string $prop
* @return bool
@ -592,7 +604,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
*
* @param string $method
* @param array $args
* @return void
* @return Zend_Application_Bootstrap_BootstrapAbstract
* @throws Zend_Application_Bootstrap_Exception On invalid method name
*/
public function __call($method, $args)

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Bootstrapper.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -26,7 +26,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Application_Bootstrap_Bootstrapper
@ -35,7 +35,6 @@ interface Zend_Application_Bootstrap_Bootstrapper
* Constructor
*
* @param Zend_Application $application
* @return void
*/
public function __construct($application);

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -30,7 +30,7 @@ require_once 'Zend/Application/Exception.php';
* @category Zend
* @package Zend_Application
* @uses Zend_Application_Exception
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Bootstrap_Exception extends Zend_Application_Exception

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ResourceBootstrapper.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -26,7 +26,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Application_Bootstrap_ResourceBootstrapper

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 25024 2012-07-30 15:08:15Z rob $
* @version $Id$
*/
/**
@ -30,7 +30,7 @@ require_once 'Zend/Exception.php';
* @uses Zend_Exception
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Exception extends Zend_Exception

View File

@ -15,8 +15,8 @@
* @category Zend
* @package Zend_Application
* @subpackage Module
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Autoloader.php 24593 2012-01-05 20:35:02Z matthew $
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id$
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -30,7 +30,7 @@ require_once 'Zend/Loader/Autoloader/Resource.php';
* @category Zend
* @package Zend_Application
* @subpackage Module
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Module_Autoloader extends Zend_Loader_Autoloader_Resource
@ -39,7 +39,6 @@ class Zend_Application_Module_Autoloader extends Zend_Loader_Autoloader_Resource
* Constructor
*
* @param array|Zend_Config $options
* @return void
*/
public function __construct($options)
{
@ -55,40 +54,42 @@ class Zend_Application_Module_Autoloader extends Zend_Loader_Autoloader_Resource
public function initDefaultResourceTypes()
{
$basePath = $this->getBasePath();
$this->addResourceTypes(array(
'dbtable' => array(
'namespace' => 'Model_DbTable',
'path' => 'models/DbTable',
),
'mappers' => array(
'namespace' => 'Model_Mapper',
'path' => 'models/mappers',
),
'form' => array(
'namespace' => 'Form',
'path' => 'forms',
),
'model' => array(
'namespace' => 'Model',
'path' => 'models',
),
'plugin' => array(
'namespace' => 'Plugin',
'path' => 'plugins',
),
'service' => array(
'namespace' => 'Service',
'path' => 'services',
),
'viewhelper' => array(
'namespace' => 'View_Helper',
'path' => 'views/helpers',
),
'viewfilter' => array(
'namespace' => 'View_Filter',
'path' => 'views/filters',
),
));
$this->addResourceTypes(
array(
'dbtable' => array(
'namespace' => 'Model_DbTable',
'path' => 'models/DbTable',
),
'mappers' => array(
'namespace' => 'Model_Mapper',
'path' => 'models/mappers',
),
'form' => array(
'namespace' => 'Form',
'path' => 'forms',
),
'model' => array(
'namespace' => 'Model',
'path' => 'models',
),
'plugin' => array(
'namespace' => 'Plugin',
'path' => 'plugins',
),
'service' => array(
'namespace' => 'Service',
'path' => 'services',
),
'viewhelper' => array(
'namespace' => 'View_Helper',
'path' => 'views/helpers',
),
'viewfilter' => array(
'namespace' => 'View_Filter',
'path' => 'views/filters',
),
)
);
$this->setDefaultResourceType('model');
}
}

View File

@ -15,8 +15,8 @@
* @category Zend
* @package Zend_Application
* @subpackage Module
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Bootstrap.php 25024 2012-07-30 15:08:15Z rob $
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id$
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -33,7 +33,7 @@ require_once 'Zend/Application/Bootstrap/Bootstrap.php';
* @category Zend
* @package Zend_Application
* @subpackage Module
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Application_Module_Bootstrap
@ -48,8 +48,7 @@ abstract class Zend_Application_Module_Bootstrap
/**
* Constructor
*
* @param Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
* @return void
* @param Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
*/
public function __construct($application)
{

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Cachemanager.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
require_once 'Zend/Application/Resource/ResourceAbstract.php';
@ -28,7 +28,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Cachemanager extends Zend_Application_Resource_ResourceAbstract
@ -60,6 +60,15 @@ class Zend_Application_Resource_Cachemanager extends Zend_Application_Resource_R
$options = $this->getOptions();
foreach ($options as $key => $value) {
// Logger
if (isset($value['frontend']['options']['logger'])) {
$logger = $value['frontend']['options']['logger'];
if (is_array($logger)) {
$value['frontend']['options']['logger'] = Zend_Log::factory($logger);
}
}
// Cache templates
if ($this->_manager->hasCacheTemplate($key)) {
$this->_manager->setTemplateOptions($key, $value);
} else {

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Db.php 25123 2012-11-14 18:27:44Z matthew $
* @version $Id$
*/
/**
@ -32,7 +32,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbstract
@ -88,7 +88,7 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
/**
* Set the adapter params
*
* @param string $adapter
* @param array $params
* @return Zend_Application_Resource_Db
*/
public function setParams(array $params)
@ -110,7 +110,7 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
/**
* Set whether to use this as default table adapter
*
* @param boolean $defaultTableAdapter
* @param bool $isDefaultTableAdapter
* @return Zend_Application_Resource_Db
*/
public function setIsDefaultTableAdapter($isDefaultTableAdapter)
@ -122,7 +122,7 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
/**
* Is this adapter the default table adapter?
*
* @return void
* @return bool
*/
public function isDefaultTableAdapter()
{
@ -160,6 +160,8 @@ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbs
if (null !== ($db = $this->getDbAdapter())) {
return $db;
}
return null;
}
/**

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Dojo.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Dojo

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -32,7 +32,7 @@ require_once 'Zend/Application/Exception.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Exception extends Zend_Application_Exception

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Frontcontroller.php 24798 2012-05-12 19:17:41Z adamlundrigan $
* @version $Id$
*/
/**
@ -32,7 +32,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resource_ResourceAbstract
@ -46,6 +46,7 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc
* Initialize Front Controller
*
* @return Zend_Controller_Front
* @throws Zend_Application_Exception
*/
public function init()
{
@ -71,7 +72,7 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc
if (is_string($value)) {
$front->addModuleDirectory($value);
} elseif (is_array($value)) {
foreach($value as $moduleDir) {
foreach ($value as $moduleDir) {
$front->addModuleDirectory($moduleDir);
}
}
@ -102,11 +103,10 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc
case 'plugins':
foreach ((array) $value as $pluginClass) {
$stackIndex = null;
if(is_array($pluginClass)) {
if (is_array($pluginClass)) {
$pluginClass = array_change_key_case($pluginClass, CASE_LOWER);
if(isset($pluginClass['class']))
{
if(isset($pluginClass['stackindex'])) {
if (isset($pluginClass['class'])) {
if (isset($pluginClass['stackindex'])) {
$stackIndex = $pluginClass['stackindex'];
}
@ -136,7 +136,7 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc
break;
case 'dispatcher':
if(!isset($value['class'])) {
if (!isset($value['class'])) {
require_once 'Zend/Application/Exception.php';
throw new Zend_Application_Exception('You must specify both ');
}
@ -145,7 +145,7 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc
}
$dispatchClass = $value['class'];
if(!class_exists($dispatchClass)) {
if (!class_exists($dispatchClass)) {
require_once 'Zend/Application/Exception.php';
throw new Zend_Application_Exception('Dispatcher class not found!');
}

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Layout.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Layout

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Locale.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Locale
@ -68,9 +68,9 @@ class Zend_Application_Resource_Locale
if (!isset($options['default'])) {
$this->_locale = new Zend_Locale();
} elseif(!isset($options['force']) ||
(bool) $options['force'] == false)
{
} elseif (!isset($options['force'])
|| (bool)$options['force'] == false
) {
// Don't force any locale, just go for auto detection
Zend_Locale::setDefault($options['default']);
$this->_locale = new Zend_Locale();

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Log.php 24607 2012-01-16 16:45:49Z xerkus $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Log

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Mail.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -32,7 +32,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceAbstract
@ -43,7 +43,8 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA
*/
protected $_transport;
public function init() {
public function init()
{
return $this->getMail();
}
@ -55,21 +56,21 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA
{
if (null === $this->_transport) {
$options = $this->getOptions();
foreach($options as $key => $option) {
foreach ($options as $key => $option) {
$options[strtolower($key)] = $option;
}
$this->setOptions($options);
if(isset($options['transport']) &&
!is_numeric($options['transport']))
{
if (isset($options['transport'])
&& !is_numeric($options['transport'])
) {
$this->_transport = $this->_setupTransport($options['transport']);
if(!isset($options['transport']['register']) ||
$options['transport']['register'] == '1' ||
(isset($options['transport']['register']) &&
!is_numeric($options['transport']['register']) &&
(bool) $options['transport']['register'] == true))
{
if (!isset($options['transport']['register'])
|| $options['transport']['register'] == '1'
|| (isset($options['transport']['register'])
&& !is_numeric($options['transport']['register'])
&& (bool)$options['transport']['register'] == true)
) {
Zend_Mail::setDefaultTransport($this->_transport);
}
}
@ -81,19 +82,23 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA
return $this->_transport;
}
protected function _setDefaults($type) {
protected function _setDefaults($type)
{
$key = strtolower('default' . $type);
$options = $this->getOptions();
if(isset($options[$key]['email']) &&
!is_numeric($options[$key]['email']))
{
if (isset($options[$key]['email'])
&& !is_numeric($options[$key]['email'])
) {
$method = array('Zend_Mail', 'setDefault' . ucfirst($type));
if(isset($options[$key]['name']) &&
!is_numeric($options[$key]['name']))
{
call_user_func($method, $options[$key]['email'],
$options[$key]['name']);
if (isset($options[$key]['name'])
&& !is_numeric(
$options[$key]['name']
)
) {
call_user_func(
$method, $options[$key]['email'], $options[$key]['name']
);
} else {
call_user_func($method, $options[$key]['email']);
}
@ -102,19 +107,17 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA
protected function _setupTransport($options)
{
if(!isset($options['type'])) {
if (!isset($options['type'])) {
$options['type'] = 'sendmail';
}
$transportName = $options['type'];
if(!Zend_Loader_Autoloader::autoload($transportName))
{
if (!Zend_Loader_Autoloader::autoload($transportName)) {
$transportName = ucfirst(strtolower($transportName));
if(!Zend_Loader_Autoloader::autoload($transportName))
{
if (!Zend_Loader_Autoloader::autoload($transportName)) {
$transportName = 'Zend_Mail_Transport_' . $transportName;
if(!Zend_Loader_Autoloader::autoload($transportName)) {
if (!Zend_Loader_Autoloader::autoload($transportName)) {
throw new Zend_Application_Resource_Exception(
"Specified Mail Transport '{$transportName}'"
. 'could not be found'
@ -128,10 +131,11 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA
switch($transportName) {
case 'Zend_Mail_Transport_Smtp':
if(!isset($options['host'])) {
if (!isset($options['host'])) {
throw new Zend_Application_Resource_Exception(
'A host is necessary for smtp transport,'
.' but none was given');
. ' but none was given'
);
}
$transport = new $transportName($options['host'], $options);

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Modules.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -32,7 +32,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Modules extends Zend_Application_Resource_ResourceAbstract
@ -46,7 +46,6 @@ class Zend_Application_Resource_Modules extends Zend_Application_Resource_Resour
* Constructor
*
* @param mixed $options
* @return void
*/
public function __construct($options = null)
{
@ -73,23 +72,27 @@ class Zend_Application_Resource_Modules extends Zend_Application_Resource_Resour
foreach ($modules as $module => $moduleDirectory) {
$bootstrapClass = $this->_formatModuleName($module) . '_Bootstrap';
if (!class_exists($bootstrapClass, false)) {
$bootstrapPath = dirname($moduleDirectory) . '/Bootstrap.php';
$bootstrapPath = dirname($moduleDirectory) . '/Bootstrap.php';
if (file_exists($bootstrapPath)) {
$eMsgTpl = 'Bootstrap file found for module "%s" but bootstrap class "%s" not found';
include_once $bootstrapPath;
if (($default != $module)
&& !class_exists($bootstrapClass, false)
) {
throw new Zend_Application_Resource_Exception(sprintf(
$eMsgTpl, $module, $bootstrapClass
));
throw new Zend_Application_Resource_Exception(
sprintf(
$eMsgTpl, $module, $bootstrapClass
)
);
} elseif ($default == $module) {
if (!class_exists($bootstrapClass, false)) {
$bootstrapClass = 'Bootstrap';
if (!class_exists($bootstrapClass, false)) {
throw new Zend_Application_Resource_Exception(sprintf(
$eMsgTpl, $module, $bootstrapClass
));
throw new Zend_Application_Resource_Exception(
sprintf(
$eMsgTpl, $module, $bootstrapClass
)
);
}
}
}
@ -117,9 +120,9 @@ class Zend_Application_Resource_Modules extends Zend_Application_Resource_Resour
protected function bootstrapBootstraps($bootstraps)
{
$bootstrap = $this->getBootstrap();
$out = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS);
$out = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS);
foreach($bootstraps as $module => $bootstrapClass) {
foreach ($bootstraps as $module => $bootstrapClass) {
$moduleBootstrap = new $bootstrapClass($bootstrap);
$moduleBootstrap->bootstrap();
$out[$module] = $moduleBootstrap;

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Multidb.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
require_once 'Zend/Application/Resource/ResourceAbstract.php';
@ -51,7 +51,7 @@ require_once 'Zend/Db/Table.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Multidb extends Zend_Application_Resource_ResourceAbstract
@ -114,7 +114,7 @@ class Zend_Application_Resource_Multidb extends Zend_Application_Resource_Resour
*/
public function isDefault($db)
{
if(!$db instanceof Zend_Db_Adapter_Abstract) {
if (!$db instanceof Zend_Db_Adapter_Abstract) {
$db = $this->getDb($db);
}

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Navigation.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @author Dolf Schimmel
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -57,10 +57,12 @@ class Zend_Application_Resource_Navigation
if (!$this->_container) {
$options = $this->getOptions();
if(isset($options['defaultPageType'])) {
Zend_Navigation_Page::setDefaultPageType($options['defaultPageType']);
if (isset($options['defaultPageType'])) {
Zend_Navigation_Page::setDefaultPageType(
$options['defaultPageType']
);
}
$pages = isset($options['pages']) ? $options['pages'] : array();
$this->_container = new Zend_Navigation($pages);
}
@ -93,15 +95,16 @@ class Zend_Application_Resource_Navigation
protected function _storeRegistry()
{
$options = $this->getOptions();
if(isset($options['storage']['registry']['key']) &&
!is_numeric($options['storage']['registry']['key'])) // see ZF-7461
{
$key = $options['storage']['registry']['key'];
// see ZF-7461
if (isset($options['storage']['registry']['key'])
&& !is_numeric($options['storage']['registry']['key'])
) {
$key = $options['storage']['registry']['key'];
} else {
$key = self::DEFAULT_REGISTRY_KEY;
}
Zend_Registry::set($key,$this->getContainer());
Zend_Registry::set($key, $this->getContainer());
}
/**

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Resource.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -26,7 +26,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Application_Resource_Resource
@ -37,7 +37,6 @@ interface Zend_Application_Resource_Resource
* Must take an optional single argument, $options.
*
* @param mixed $options
* @return void
*/
public function __construct($options = null);

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ResourceAbstract.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -32,7 +32,7 @@ require_once 'Zend/Application/Resource/Resource.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Application_Resource_ResourceAbstract implements Zend_Application_Resource_Resource

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Router.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Router

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Session.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Session extends Zend_Application_Resource_ResourceAbstract
@ -62,6 +62,7 @@ class Zend_Application_Resource_Session extends Zend_Application_Resource_Resour
* Get session save handler
*
* @return Zend_Session_SaveHandler_Interface
* @throws Zend_Application_Resource_Exception
*/
public function getSaveHandler()
{

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Translate.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Translate extends Zend_Application_Resource_ResourceAbstract
@ -86,8 +86,14 @@ class Zend_Application_Resource_Translate extends Zend_Application_Resource_Reso
unset($options['data']);
}
if (isset($options['log'])) {
if (is_array($options['log'])) {
$options['log'] = Zend_Log::factory($options['log']);
}
}
if (isset($options['options'])) {
foreach($options['options'] as $key => $value) {
foreach ($options['options'] as $key => $value) {
$options[$key] = $value;
}
}
@ -112,13 +118,15 @@ class Zend_Application_Resource_Translate extends Zend_Application_Resource_Reso
: self::DEFAULT_REGISTRY_KEY;
unset($options['registry_key']);
if(Zend_Registry::isRegistered($key)) {
if (Zend_Registry::isRegistered($key)) {
$translate = Zend_Registry::get($key);
if(!$translate instanceof Zend_Translate) {
if (!$translate instanceof Zend_Translate) {
require_once 'Zend/Application/Resource/Exception.php';
throw new Zend_Application_Resource_Exception($key
. ' already registered in registry but is '
. 'no instance of Zend_Translate');
throw new Zend_Application_Resource_Exception(
$key
. ' already registered in registry but is '
. 'no instance of Zend_Translate'
);
}
$translate->addTranslation($options);

View File

@ -15,7 +15,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -23,7 +23,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_UserAgent extends Zend_Application_Resource_ResourceAbstract

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: View.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
@ -33,7 +33,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_View extends Zend_Application_Resource_ResourceAbstract

View File

@ -14,16 +14,16 @@
*
* @category Zend
* @package Zend_Auth
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Auth.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
/**
* @category Zend
* @package Zend_Auth
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Auth

Some files were not shown because too many files have changed in this diff Show More