Skip to content
Snippets Groups Projects
Commit 6e963d6e authored by PERCIN Cahit's avatar PERCIN Cahit
Browse files

ajout des fichier de debut

parent a609d83b
Branches
No related tags found
No related merge requests found
Showing
with 2868 additions and 1 deletion
# Add any directories, files, or patterns you don't want to be tracked by version control
*/vendor
/vendor
*.phar
.ini
conf.ini
......
{
"require":{
"illuminate/database": "5.5.*",
"php": ">=7.0",
"slim/slim": "2.*"
},
"autoload":{
"psr-4": {
"ccd\\" : "src/"
}
}
}
This diff is collapsed.
html {
font: 400 12px/1.667 "Open Sans", sans-serif;
}
.menu {
background-color: white;
left: 0;
overflow: hidden;
padding: 0;
position: fixed;
top: 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
width: 100%;
height: 50px;
z-index: 100;
border: 0px;
border-bottom: 2px;
border-style: solid;
border-color: #AAA;
}
#logo > a > img {
margin: 0;
padding: 0;
height: 50px;
float: left;
}
#menu_button{
position: relative;
float: right;
margin: 0;
padding:0;
height: 100%;
}
#menu_button > ul {
position: relative;
display: flex;
list-style: none;
margin: auto;
height: 100%;
}
.bouton {
display: block;
font-size: 18px;
text-decoration: none;
transition: all 0.3s linear;
border: 10px;
border-style: solid; border-color: #3BC;
background:#3BC;
text-align: center;
color: white;
padding: 0;
margin: auto;
}
.bouton:hover {
border-color: #39C;
background:#39C;
}
body {
background-image: url(../img/accueil00.png);
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
#first{
font: 400 24px/1.667 "Open Sans", sans-serif;
background-color: white;
padding: 10px;
margin: auto;
position: fixed;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
align-content: center;
margin-top: 25%;
width: 50%;
z-index: 10;
}
#first > a {
width: 30%;
}
#arrow01 {
display: block;
background-image: url("../img/arrow01.gif");
background-size: cover;
background-repeat: no-repeat;
position: fixed;
padding: 10px;
transform: translate(-50px, 0px);
left: 50%;
bottom: -4%;
width: 80px;
height: 80px;
z-index: 10;
}
#second{
font-size: 20px;
background-color: white;
padding: 10px;
margin: auto;
position: absolute;
left: 0px;
text-align: center;
top: 100%;
width: 100%;
box-sizing: border-box;
z-index: 50;
border-top: solid;
}
.center {
font-size: 24px;
background-color: white;
padding: 10px;
margin: auto;
position: relative;
text-align: center;
align-content: center;
margin-top: 15%;
width: 50%;
min-width: 500px;
z-index: 10;
}
.exception {
color: red;
font-size: 15px;
}
fieldset {
border-radius: 5px;
}
fieldset > legend{
font-size: 24px;
}
label {
font-size: 20px;
float: left;
text-align: right;
}
input:not([type=submit]):focus {
border-color:#333;
}
input:not([type=submit]) {
border-radius: 5px;
float: right;
text-align: left;
font-size: 18px;
width: 50%;
}
input[type=submit], button {
font: 400 18px/1.667 "Open Sans", sans-serif;
padding:5px 15px;
background:#ccc;
border:0 none;
cursor:pointer;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.list {
font-size: 24px;
background-color: white;
padding: 10px;
margin: auto;
position: absolute;
left: 50%;
transform: translate(-50%, -0px);
text-align: center;
align-content: center;
margin-top: 70px;
width: 90%;
min-width: 100px;
min-height: 80%;
z-index: 10;
}
.element {
padding: 2px;
background: #DDD;
margin: 0;
border: 1px;
border-style: solid;
border-color: #AAA;
height: 15%;
overflow: hidden;
margin: 5px;
}
.element > .title{
margin: 0;
padding:0;
position: absolute;
text-align: left;
text-decoration: none;
left: 180px;
font-size: 28px;
}
.element > .desc{
display: flex;
position: absolute;
text-align: left;
text-justify: inter-character;
transform: translate(-0%, +26px);
left: 170px;
height: 10%;
width: 45%;
font-size: 16px;
overflow: hidden;
}
.element > a >img {
float: left;
left: 0;
height: 138px;
overflow: hidden
}
.choixRecette {
font-size: 24px;
background-color: white;
padding: 10px;
margin: auto;
position: fixed;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
align-content: center;
margin-top: 25%;
width: 50%;
z-index: 10;
}
.choixEvent {
font-size: 24px;
background-color: white;
padding: 10px;
margin: auto;
position: fixed;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
align-content: center;
margin-top: 25%;
width: 50%;
z-index: 10;
}
.creationEvenement {
font-size: 24px;
background-color: white;
padding: 10px;
margin: auto;
position: relative;
text-align: center;
align-content: center;
margin-top: 12.5%;
width: 50%;
min-width: 500px;
z-index: 10;
}
#con {
font-size: 24px;
background-color: white;
padding: 10px;
margin: auto;
position: relative;
text-align: center;
align-content: center;
margin-top: 12.5%;
width: 50%;
min-width: 500px;
z-index: 10;
}
.conPadding {
align-content: center;
padding: 50px;
padding-bottom: 100px;
}
.labelCon {
float: left;
text-align: right;
}
.inputCon {
float: right;
text-align: left;
font-size: 18px;
width: 50%;
}
#ins {
font-size: 24px;
background-color: white;
padding: 10px;
margin: auto;
position: relative;
text-align: center;
align-content: center;
margin-top: 12.5%;
width: 50%;
min-width: 600px;
z-index: 10;
}
.labelIns {
font-size: 20px;
float: left;
text-align: right;
}
.inputIns {
float: right;
text-align: left;
font-size: 18px;
width: 50%;
}
input[type=search] {
float: right;
text-align: left;
font-size: 18px;
width: 80%;
}
.searchDiv {
padding: 2px;
background-color: white;
margin: 0;
border: 1px;
border-style: solid;
border-color: #AAA;
height: 15%;
overflow: hidden;
margin: 5px;
}
.searchEvent {
width: 50%;
}
.form {
font-size: 24px;
background-color: white;
padding: 10px;
margin: auto;
position: relative;
text-align: center;
align-content: center;
margin-top: 12.5%;
width: 60%;
min-width: 500px;
z-index: 10;
}
.labelForm {
float: left;
text-align: right;
}
.inputForm {
float: right;
text-align: left;
font-size: 18px;
width: 50%;
}
\ No newline at end of file
index.php 0 → 100644
<?php
require_once __DIR__ . '/vendor/autoload.php';
session_start();
use \Slim\Slim as Slim;
use Illuminate\Database\Capsule\Manager as DB;
$db = new DB();
$db->addConnection(parse_ini_file('./src/conf/conf.ini'));
$db->setAsGlobal();
$db->bootEloquent();
$app = new \Slim\Slim();
$app->get('/',function () {
$c = new \fridgie\controleurs\ControleurPrincipal();
$c->afficherAccueil();
});
/*
* ----------------------------------------------------------------
* Controleur Recette
* ----------------------------------------------------------------
*/
$app->get('/indexrecette', function() {
$c = new \fridgie\controleurs\ControleurRecette();
$c->indexRecette();
});
$app->get('/recette',function () {
$c = new \fridgie\controleurs\ControleurRecette();
$c->getRecette();
});
$app->post('/recette',function () {
$c = new \fridgie\controleurs\ControleurRecette();
$c->afficherRecette();
});
$app->get('/afficherrecette/:id',function ($id) {
$c = new \fridgie\controleurs\ControleurRecette();
$c->afficherRecetteId($id);
});
$app->get('/nouvellerecette', function() {
$c = new \fridgie\controleurs\ControleurRecette();
$c->formulaireInsererRecette();
});
$app->post('/nouvellerecette', function() {
$c = new \fridgie\controleurs\ControleurRecette();
$c->traitementformulaireInsererRecette();
});
$app->get('/rechercherecette', function() {
$c = new \fridgie\controleurs\ControleurRecette();
$c->formulaireRechercheRecette();
});
$app->post('/rechercherecette', function() {
$c = new \fridgie\controleurs\ControleurRecette();
$c->traitementFormulaireRechercheRecette();
});
/*
* ----------------------------------------------------------------
* Controleur Evenement
* ----------------------------------------------------------------
*/
$app->get('/indexevenement', function() {
$c = new \fridgie\controleurs\ControleurEvenement();
$c->indexEvenement();
});
$app->get('/creationevenement',function () {
$c = new \fridgie\controleurs\ControleurEvenement();
$c->creerEvenement();
});
$app->post('/creationevenement',function () {
$c = new \fridgie\controleurs\ControleurEvenement();
$c->creerEvenementPost();
});
$app->get('/afficherevenements', function() {
$c = new \fridgie\controleurs\ControleurEvenement();
$c->afficherEvenements();
});
$app->get('/afficherevenement/:token',function ($token) {
$c = new \fridgie\controleurs\ControleurEvenement();
$c->afficherEvenement($token);
});
//$app->get('/participerevenement/:token', function($token) {
// $c = new \fridgie\controleurs\ControleurEvenement();
// $c->participerEvenement($token);
//});
$app->post('/participerevenement/:token', function($token) {
$c = new \fridgie\controleurs\ControleurEvenement();
$c->participerEvenementPost($token);
});
//par nom
$app->get('/rechercheevenement/:recherche',function ($recherche) {
$c = new \fridgie\controleurs\ControleurEvenement();
$c->rechercheEvenement($recherche);
});
/*
* ----------------------------------------------------------------
* Controleur Ingredient
* ----------------------------------------------------------------
*/
$app->post('/apporteringredient/:token', function($token) { //token = token de l'event
$c = new \fridgie\controleurs\ControleurIngredient();
$c->apporterIngredient($token);
header('Location: ../afficherevenement/' . $token);
exit();
});
$app->get('/apporteringredient/:token', function($token) { //token = token de l'event
$c = new \fridgie\controleurs\ControleurIngredient();
$c->apporterIngredientForm($token);
});
$app->get('/ingredient/:id', function($id) { //id = id de l'ingredient à afficher
$c = new \fridgie\controleurs\ControleurIngredient();
$c->afficherIngredient($id);
});
/*
* ----------------------------------------------------------------
* Controleur Client
* ----------------------------------------------------------------
*/
$app->get('/inscription', function() {
$c = new \fridgie\controleurs\ControleurClient();
$c->creerCompte();
});
$app->post('/inscription', function() {
$c = new \fridgie\controleurs\ControleurClient();
$c->traitementInscription();
});
$app->get('/connexion', function() {
$c = new \fridgie\controleurs\ControleurClient();
if (isset($_SESSION['Connexion']) == true) {
header('Location: ./moncompte');
exit();
}
else $c->identification();
});
$app->post('/connexion', function() {
$c = new \fridgie\controleurs\ControleurClient();
$c->traitementIdentification();
});
$app->post('/deconnexion', function() {
$c = new \fridgie\controleurs\ControleurClient();
$c->deconnexion();
});
$app->get('/moncompte', function() {
$c = new \fridgie\controleurs\ControleurClient();
$c->afficherCompte();
});
$app->post('/suppression', function() {
$c = new \fridgie\controleurs\ControleurClient();
$c->delete();
});
$app->run();
\ No newline at end of file
<?php
namespace fridgie\controleurs;
class ControleurPrincipal
{
public function afficherAccueil() {
$tab = [];
$v = new \fridgie\vues\VuePrincipale($tab);
$v->render('afficherAccueil');
}
}
\ No newline at end of file
<?php
namespace fridgie\vues;
class VuePrincipale
{
public $tab;
public function __construct($tableau) {
$this->tab = $tableau;
}
public function render($selecteur) {
switch ($selecteur){
case 'afficherAccueil' : {
$content = $this->afficherAccueil();
$cd = '';
break;
}
}
if (isset($_SESSION['Connexion']) == false) {
$html = <<<END
<!doctype html>
<html class="no-js" lang="fr" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fridgie</title>
<link rel="stylesheet" href="{$cd}css/style.css">
</head>
<header class="menu" role="banner">
<div id="logo"><a href="{$cd}./"><img src="{$cd}img/logo.png"></a></div>
<div id="menu_button">
<ul>
<li><a class="bouton" href="{$cd}./">Accueil</a></li>
<li><a class="bouton" href="{$cd}indexevenement">Evenement</a></li>
<li><a class="bouton" href="{$cd}indexrecette">Recette</a></li>
<li><a class="bouton" href="{$cd}connexion">Connexion</a></li>
</ul>
</div>
</header>
<body>
$content
</body>
</html>
END;
} else {
$html = <<<END
<!doctype html>
<html class="no-js" lang="fr" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fridgie</title>
<link rel="stylesheet" href="css/style.css">
</head>
<header class="menu" role="banner">
<div id="logo"><a href="{$cd}./"><img src="{$cd}img/logo.png"></a></div>
<div id="menu_button">
<ul>
<li><a class="bouton" href="{$cd}./">Accueil</a></li>
<li><a class="bouton" href="{$cd}indexevenement">Evenement</a></li>
<li><a class="bouton" href="{$cd}indexrecette">Recette</a></li>
<li><a class="bouton" href="{$cd}moncompte">Mon Compte</a></li>
</ul>
</div>
</header>
<body>
$content
</body>
</html>
END;
}
echo $html;
}
private function afficherAccueil() {
if (isset($_SESSION['Connexion']) == false) {
$res="
<div id=\"first\">
<p><strong>Bienvenue sur Fridgie !</strong>
<br>Rejoignez-nous en vous inscrivant en appuyant ci-dessous.</p>
<a class=\"bouton\" href=\"inscription\">Inscription</a>
</div>";
} else {
$res="
<div id=\"first\">
<p><strong>Bienvenue sur Fridgie !</strong>
<br>Recherchez une recette en appuyant ci-dessous.</p>
<a class=\"bouton\" href=\"recette\">Recherche</a>
</div>";
}
return $res."<div id='arrow01'></div><div id=\"second\">
<p>
Fridgie est une application web développée par quatre étudiants de 2ème de DUT Informatique.
Principe du site-web :
<br>Aujourd'hui, nous avons tellement de produits à consommer dans nos frigos qu'au final, nous ne savons même plus quoi manger.
C'est là que Fridgie intervient. En effet, il vous permet de trouver une liste de recette en fonction des ingrédients que vous avez dans votre frigo.
Mais Fridgie est plus grand que ça ! Vous pouvez aussi par exemple créer un évenement qui tourne autour d'une recette, suivant ce principe,
les membres qui s'inscrivent à l'évenement peuvent vous notifier qu'ils apportent tel ou tel ingrédient, et réalisez, facilement,
un plat collaboratif !
<br><br> S3C - KRELL SPICK PERCIN SASSU
</p>
</div>";
}
}
\ No newline at end of file
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit9dd92070b68bdceeba5acfcd17a6e4b5::getLoader();
#!/usr/bin/env sh
dir=$(d=${0%[/\\]*}; cd "$d" > /dev/null; cd "../nesbot/carbon/bin" && pwd)
# See if we are running in Cygwin by checking for cygpath program
if command -v 'cygpath' >/dev/null 2>&1; then
# Cygwin paths start with /cygdrive/ which will break windows PHP,
# so we need to translate the dir path to windows format. However
# we could be using cygwin PHP which does not require this, so we
# test if the path to PHP starts with /cygdrive/ rather than /usr/bin
if [[ $(which php) == /cygdrive/* ]]; then
dir=$(cygpath -m "$dir");
fi
fi
dir=$(echo $dir | sed 's/ /\ /g')
"${dir}/upgrade-carbon" "$@"
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/../nesbot/carbon/bin/upgrade-carbon
php "%BIN_TARGET%" %*
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();
// PSR-0
private $prefixesPsr0 = array();
private $fallbackDirsPsr0 = array();
private $useIncludePath = false;
private $classMap = array();
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
return array();
}
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
}
/**
* Unregisters this instance as an autoloader.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
foreach ($this->prefixDirsPsr4[$search] as $dir) {
$length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php',
);
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'UpdateHelper\\' => array($vendorDir . '/kylekatarnls/update-helper/src'),
'Slim' => array($vendorDir . '/slim/slim'),
);
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'fridgie\\' => array($baseDir . '/src'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Illuminate\\Support\\' => array($vendorDir . '/illuminate/support'),
'Illuminate\\Database\\' => array($vendorDir . '/illuminate/database'),
'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
'Illuminate\\Container\\' => array($vendorDir . '/illuminate/container'),
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'),
'' => array($vendorDir . '/nesbot/carbon/src'),
);
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit9dd92070b68bdceeba5acfcd17a6e4b5
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit9dd92070b68bdceeba5acfcd17a6e4b5', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit9dd92070b68bdceeba5acfcd17a6e4b5', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit9dd92070b68bdceeba5acfcd17a6e4b5::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit9dd92070b68bdceeba5acfcd17a6e4b5::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire9dd92070b68bdceeba5acfcd17a6e4b5($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire9dd92070b68bdceeba5acfcd17a6e4b5($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInit9dd92070b68bdceeba5acfcd17a6e4b5
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php',
);
public static $prefixLengthsPsr4 = array (
'f' =>
array (
'fridgie\\' => 8,
),
'S' =>
array (
'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Component\\Translation\\' => 30,
),
'P' =>
array (
'Psr\\SimpleCache\\' => 16,
'Psr\\Container\\' => 14,
),
'I' =>
array (
'Illuminate\\Support\\' => 19,
'Illuminate\\Database\\' => 20,
'Illuminate\\Contracts\\' => 21,
'Illuminate\\Container\\' => 21,
),
'D' =>
array (
'Doctrine\\Common\\Inflector\\' => 26,
),
);
public static $prefixDirsPsr4 = array (
'fridgie\\' =>
array (
0 => __DIR__ . '/../..' . '/src',
),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
'Symfony\\Component\\Translation\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/translation',
),
'Psr\\SimpleCache\\' =>
array (
0 => __DIR__ . '/..' . '/psr/simple-cache/src',
),
'Psr\\Container\\' =>
array (
0 => __DIR__ . '/..' . '/psr/container/src',
),
'Illuminate\\Support\\' =>
array (
0 => __DIR__ . '/..' . '/illuminate/support',
),
'Illuminate\\Database\\' =>
array (
0 => __DIR__ . '/..' . '/illuminate/database',
),
'Illuminate\\Contracts\\' =>
array (
0 => __DIR__ . '/..' . '/illuminate/contracts',
),
'Illuminate\\Container\\' =>
array (
0 => __DIR__ . '/..' . '/illuminate/container',
),
'Doctrine\\Common\\Inflector\\' =>
array (
0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector',
),
);
public static $fallbackDirsPsr4 = array (
0 => __DIR__ . '/..' . '/nesbot/carbon/src',
);
public static $prefixesPsr0 = array (
'U' =>
array (
'UpdateHelper\\' =>
array (
0 => __DIR__ . '/..' . '/kylekatarnls/update-helper/src',
),
),
'S' =>
array (
'Slim' =>
array (
0 => __DIR__ . '/..' . '/slim/slim',
),
),
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit9dd92070b68bdceeba5acfcd17a6e4b5::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit9dd92070b68bdceeba5acfcd17a6e4b5::$prefixDirsPsr4;
$loader->fallbackDirsPsr4 = ComposerStaticInit9dd92070b68bdceeba5acfcd17a6e4b5::$fallbackDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit9dd92070b68bdceeba5acfcd17a6e4b5::$prefixesPsr0;
}, null, ClassLoader::class);
}
}
This diff is collapsed.
Copyright (c) 2006-2015 Doctrine Project
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment