diff --git a/.gitignore b/.gitignore index d26482ae7366693c95bc62697c1a55f4e05aa8ad..1e51a9ecfef8071e6b7ec0640209c167eb08e01c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ .settings .project .hcaccess +.idea bin/ vendor/ diff --git a/php/.idea/misc.xml b/php/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..28a804d8932aba40f168fd757a74cb718a955a1a --- /dev/null +++ b/php/.idea/misc.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="JavaScriptSettings"> + <option name="languageLevel" value="ES6" /> + </component> +</project> \ No newline at end of file diff --git a/php/.idea/modules.xml b/php/.idea/modules.xml new file mode 100644 index 0000000000000000000000000000000000000000..2047c36d5e0ed19df0d176d7e1c3545b30811f21 --- /dev/null +++ b/php/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/.idea/php.iml" filepath="$PROJECT_DIR$/.idea/php.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/php/.idea/php.iml b/php/.idea/php.iml new file mode 100644 index 0000000000000000000000000000000000000000..13162c252aba0bd19bab910eeda6b482651fc4f9 --- /dev/null +++ b/php/.idea/php.iml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="WEB_MODULE" version="4"> + <component name="NewModuleRootManager"> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="bddApp\" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/composer" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/inflector" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/illuminate/container" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/illuminate/contracts" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/illuminate/database" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/illuminate/support" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/kylekatarnls/update-helper" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/psr/simple-cache" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/slim/slim" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" /> + <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation-contracts" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/php/.idea/php.xml b/php/.idea/php.xml new file mode 100644 index 0000000000000000000000000000000000000000..38922fb9c0a6408aa44ae1b7de6ca2cc4001138e --- /dev/null +++ b/php/.idea/php.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="PhpIncludePathManager"> + <include_path> + <path value="$PROJECT_DIR$/vendor/psr/container" /> + <path value="$PROJECT_DIR$/vendor/psr/simple-cache" /> + <path value="$PROJECT_DIR$/vendor/slim/slim" /> + <path value="$PROJECT_DIR$/vendor/nesbot/carbon" /> + <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" /> + <path value="$PROJECT_DIR$/vendor/symfony/translation" /> + <path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" /> + <path value="$PROJECT_DIR$/vendor/doctrine/inflector" /> + <path value="$PROJECT_DIR$/vendor/illuminate/container" /> + <path value="$PROJECT_DIR$/vendor/illuminate/contracts" /> + <path value="$PROJECT_DIR$/vendor/illuminate/database" /> + <path value="$PROJECT_DIR$/vendor/illuminate/support" /> + <path value="$PROJECT_DIR$/vendor/kylekatarnls/update-helper" /> + <path value="$PROJECT_DIR$/vendor/composer" /> + </include_path> + </component> + <component name="PhpProjectSharedConfiguration" php_language_level="7.2" /> +</project> \ No newline at end of file diff --git a/php/.idea/vcs.xml b/php/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c0b8635858dc7ad44b93df54b762707ce49eefc --- /dev/null +++ b/php/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="$PROJECT_DIR$/.." vcs="Git" /> + </component> +</project> \ No newline at end of file diff --git a/php/.idea/workspace.xml b/php/.idea/workspace.xml new file mode 100644 index 0000000000000000000000000000000000000000..320065cbcb96b691d896c815839a0527d12f599b --- /dev/null +++ b/php/.idea/workspace.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ChangeListManager"> + <list default="true" id="05e8131d-805d-4cc6-8fa3-f73a4e3adbe8" name="Default Changelist" comment="" /> + <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> + <option name="SHOW_DIALOG" value="false" /> + <option name="HIGHLIGHT_CONFLICTS" value="true" /> + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> + <option name="LAST_RESOLUTION" value="IGNORE" /> + </component> + <component name="ComposerSettings" synchronizationState="SYNCHRONIZE"> + <pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath> + <execution> + <executable /> + </execution> + </component> + <component name="Git.Settings"> + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." /> + </component> + <component name="PhpWorkspaceProjectConfiguration"> + <include_path> + <path value="$PROJECT_DIR$/vendor/psr/container" /> + <path value="$PROJECT_DIR$/vendor/psr/simple-cache" /> + <path value="$PROJECT_DIR$/vendor/slim/slim" /> + <path value="$PROJECT_DIR$/vendor/nesbot/carbon" /> + <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" /> + <path value="$PROJECT_DIR$/vendor/symfony/translation" /> + <path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" /> + <path value="$PROJECT_DIR$/vendor/doctrine/inflector" /> + <path value="$PROJECT_DIR$/vendor/illuminate/container" /> + <path value="$PROJECT_DIR$/vendor/illuminate/contracts" /> + <path value="$PROJECT_DIR$/vendor/illuminate/database" /> + <path value="$PROJECT_DIR$/vendor/illuminate/support" /> + <path value="$PROJECT_DIR$/vendor/kylekatarnls/update-helper" /> + <path value="$PROJECT_DIR$/vendor/composer" /> + </include_path> + </component> + <component name="ProjectId" id="1YZ2cijbAUUj7bEHMcSppp51gYv" /> + <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> + <component name="PropertiesComponent"> + <property name="WebServerToolWindowFactoryState" value="false" /> + <property name="last_opened_file_path" value="$PROJECT_DIR$" /> + </component> + <component name="RecentsManager"> + <key name="MoveFile.RECENT_KEYS"> + <recent name="C:\xampp\htdocs\s4ai2_game_weber_gardel_gregoire_frantzen\php\src" /> + </key> + </component> + <component name="RunDashboard"> + <option name="ruleStates"> + <list> + <RuleState> + <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> + </RuleState> + <RuleState> + <option name="name" value="StatusDashboardGroupingRule" /> + </RuleState> + </list> + </option> + </component> + <component name="SvnConfiguration"> + <configuration /> + </component> + <component name="TaskManager"> + <task active="true" id="Default" summary="Default task"> + <changelist id="05e8131d-805d-4cc6-8fa3-f73a4e3adbe8" name="Default Changelist" comment="" /> + <created>1583135876716</created> + <option name="number" value="Default" /> + <option name="presentableId" value="Default" /> + <updated>1583135876716</updated> + <workItem from="1583135877969" duration="661000" /> + </task> + <servers /> + </component> + <component name="TypeScriptGeneratedFilesManager"> + <option name="version" value="1" /> + </component> + <component name="Vcs.Log.Tabs.Properties"> + <option name="TAB_STATES"> + <map> + <entry key="MAIN"> + <value> + <State /> + </value> + </entry> + </map> + </option> + </component> +</project> \ No newline at end of file diff --git a/php/composer.json b/php/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..38128b855b99ac06af04902f7af8c3514952b475 --- /dev/null +++ b/php/composer.json @@ -0,0 +1,13 @@ +{ + "require":{ + "illuminate/database": "5.5.*", + "php": ">=7.2", + "slim/slim": "2.*" + }, + + "autoload":{ + "psr-4": { + "bddApp\\" : "src/" + } + } +} diff --git a/php/conf.inif.sample.txt b/php/conf.inif.sample.txt new file mode 100644 index 0000000000000000000000000000000000000000..a6306b02df51adca872fc297780214bd3d29c828 --- /dev/null +++ b/php/conf.inif.sample.txt @@ -0,0 +1,8 @@ +driver=mysql +username=root +password= +host= +database=bddApp +charset=utf8 +collation=utf8_unicode_ci +prefix= \ No newline at end of file diff --git a/php/index.php b/php/index.php new file mode 100644 index 0000000000000000000000000000000000000000..3c3f4344343dec8aa0cac5bb91259bc92d048731 --- /dev/null +++ b/php/index.php @@ -0,0 +1,19 @@ +<?php +require_once __DIR__ . '/vendor/autoload.php'; + +use Illuminate\Database\Capsule\Manager as DB; +$db = new DB(); +$db->addConnection(parse_ini_file('conf.ini')); +$db->setAsGlobal(); +$db->bootEloquent(); + +/* +$app = new \Slim\Slim; + +$app->get('/', function(){ + $c=new ControllerPlanning(); + $c->getCycle(1); +})->name('home'); + +$app->run(); +*/ \ No newline at end of file diff --git a/php/src/Model/Game.php b/php/src/Model/Game.php new file mode 100644 index 0000000000000000000000000000000000000000..efd342417922c14a4b8c4d78b623a93513f78c1f --- /dev/null +++ b/php/src/Model/Game.php @@ -0,0 +1,9 @@ +<?php +namespace bddApp\model; + +class Game extends \Illuminate\Database\Eloquent\Model +{ + protected $table = 'game'; + protected $primaryKey = 'id'; + public $timestamps = false; +} \ No newline at end of file