php-cs-fixer
This commit is contained in:
parent
7d108fe9c3
commit
24f1a18dfc
|
@ -2,7 +2,33 @@
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="cf1e275f-fbc1-41d4-a421-0f55447b6367" name="Default" comment="">
|
<list default="true" id="cf1e275f-fbc1-41d4-a421-0f55447b6367" name="Default" comment="">
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/App.php" afterPath="$PROJECT_DIR$/app/App.php" />
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/App.php" afterPath="$PROJECT_DIR$/app/App.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/config/config.yml" afterPath="$PROJECT_DIR$/app/config/config.yml" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/config/default/config.php" afterPath="$PROJECT_DIR$/app/config/default/config.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/providers.php" afterPath="$PROJECT_DIR$/app/providers.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/resume.html.twig" afterPath="$PROJECT_DIR$/app/views/resume.html.twig" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/uikit.html.twig" afterPath="$PROJECT_DIR$/app/views/uikit.html.twig" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/dump.php" afterPath="$PROJECT_DIR$/dump.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Command/SchemaValidationCommand.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Command/SchemaValidationCommand.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Config/ConfigServiceProvider.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Config/ConfigServiceProvider.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Config/ConfigTrait.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Config/ConfigTrait.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Controller/ApiControllerProvider.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Controller/ApiControllerProvider.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Controller/ResumeControllerProvider.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Controller/ResumeControllerProvider.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/FacebookProfileIcon.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/FacebookProfileIcon.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/GithubProfileIcon.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/GithubProfileIcon.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/GitlabProfileIcon.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/GitlabProfileIcon.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/LinkedinProfileIcon.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/LinkedinProfileIcon.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/ProfileIconInterface.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/ProfileIconInterface.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/TwitterProfileIcon.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Image/Profile/TwitterProfileIcon.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Json/JsonFileTrait.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Json/JsonFileTrait.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Json/JsonServiceProvider.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Json/JsonServiceProvider.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Json/JsonTrait.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Json/JsonTrait.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Json/ResumeBuilder.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Json/ResumeBuilder.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Resume/ResumeParser.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Resume/ResumeParser.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Twig/Date.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Twig/Date.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Sikofitt/Twig/RenderProfile.php" afterPath="$PROJECT_DIR$/src/Sikofitt/Twig/RenderProfile.php" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/web/index.php" afterPath="$PROJECT_DIR$/web/index.php" />
|
||||||
</list>
|
</list>
|
||||||
<ignored path="resume.iws" />
|
<ignored path="resume.iws" />
|
||||||
<ignored path=".idea/workspace.xml" />
|
<ignored path=".idea/workspace.xml" />
|
||||||
|
@ -27,9 +53,11 @@
|
||||||
<file leaf-file-name="index.php" pinned="false" current-in-tab="false">
|
<file leaf-file-name="index.php" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/web/index.php">
|
<entry file="file://$PROJECT_DIR$/web/index.php">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="374">
|
<state relative-caret-position="220">
|
||||||
<caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
|
<caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -37,7 +65,7 @@
|
||||||
<file leaf-file-name="resume.json" pinned="false" current-in-tab="false">
|
<file leaf-file-name="resume.json" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/data/resume.json">
|
<entry file="file://$PROJECT_DIR$/data/resume.json">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="330">
|
<state relative-caret-position="990">
|
||||||
<caret line="45" column="45" selection-start-line="45" selection-start-column="45" selection-end-line="45" selection-end-column="45" />
|
<caret line="45" column="45" selection-start-line="45" selection-start-column="45" selection-end-line="45" selection-end-column="45" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
|
@ -54,34 +82,21 @@
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name="Procfile" pinned="false" current-in-tab="false">
|
<file leaf-file-name="resume.html.twig" pinned="false" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/Procfile">
|
<entry file="file://$PROJECT_DIR$/app/views/resume.html.twig">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="359">
|
||||||
<caret line="0" column="79" selection-start-line="0" selection-start-column="79" selection-end-line="0" selection-end-column="79" />
|
<caret line="231" column="20" selection-start-line="231" selection-start-column="20" selection-end-line="231" selection-end-column="20" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name="resume.html.twig" pinned="false" current-in-tab="false">
|
<file leaf-file-name="App.php" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/resume.html.twig">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="154">
|
|
||||||
<caret line="7" column="16" selection-start-line="7" selection-start-column="16" selection-end-line="7" selection-end-column="16" />
|
|
||||||
<folding>
|
|
||||||
<marker date="1468031890670" expanded="true" signature="40:123" ph="{% block title ...%}" />
|
|
||||||
<marker date="1468031890670" expanded="true" signature="124:9986" ph="{% block body ...%}" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file leaf-file-name="App.php" pinned="false" current-in-tab="true">
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/App.php">
|
<entry file="file://$PROJECT_DIR$/app/App.php">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="462">
|
<state relative-caret-position="110">
|
||||||
<caret line="130" column="9" selection-start-line="130" selection-start-column="9" selection-end-line="130" selection-end-column="9" />
|
<caret line="122" column="20" selection-start-line="122" selection-start-column="20" selection-end-line="122" selection-end-column="20" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
@ -100,9 +115,12 @@
|
||||||
<file leaf-file-name="ResumeBuilder.php" pinned="false" current-in-tab="false">
|
<file leaf-file-name="ResumeBuilder.php" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/src/Sikofitt/Json/ResumeBuilder.php">
|
<entry file="file://$PROJECT_DIR$/src/Sikofitt/Json/ResumeBuilder.php">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="814">
|
<state relative-caret-position="484">
|
||||||
<caret line="37" column="0" selection-start-line="37" selection-start-column="0" selection-end-line="37" selection-end-column="0" />
|
<caret line="37" column="0" selection-start-line="37" selection-start-column="0" selection-end-line="37" selection-end-column="0" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
<element signature="e#341#349#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -110,22 +128,10 @@
|
||||||
<file leaf-file-name="uikit.html.twig" pinned="false" current-in-tab="false">
|
<file leaf-file-name="uikit.html.twig" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/uikit.html.twig">
|
<entry file="file://$PROJECT_DIR$/app/views/uikit.html.twig">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="616">
|
<state relative-caret-position="660">
|
||||||
<caret line="30" column="6" selection-start-line="30" selection-start-column="6" selection-end-line="30" selection-end-column="6" />
|
<caret line="30" column="6" selection-start-line="30" selection-start-column="6" selection-end-line="30" selection-end-column="6" />
|
||||||
<folding>
|
<folding>
|
||||||
<marker date="1468031890671" expanded="true" signature="52:927" ph="..." />
|
<marker date="1468121015070" expanded="true" signature="768:877" ph="{% block javascripts_head ...%}" />
|
||||||
<marker date="1468031890671" expanded="true" signature="152:182" ph="{% block meta ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="192:229" ph="{% block title ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="240:359" ph="{% block shortcut_icon ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="362:482" ph="{% block apple_meta ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="537:574" ph="{% block stylesheets ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="577:616" ph="{% block inline_styles ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="768:877" ph="{% block javascripts_head ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="880:920" ph="{% block inline_js_head ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="935:1161" ph="..." />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1026:1069" ph="..." />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1030:1063" ph="{% block body ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1071:1113" ph="{% block javascripts_foot ...%}" />
|
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
@ -134,7 +140,7 @@
|
||||||
<file leaf-file-name="config.yml" pinned="false" current-in-tab="false">
|
<file leaf-file-name="config.yml" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/app/config/config.yml">
|
<entry file="file://$PROJECT_DIR$/app/config/config.yml">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="88">
|
<state relative-caret-position="154">
|
||||||
<caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
|
<caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
|
@ -167,7 +173,6 @@
|
||||||
<option value="$PROJECT_DIR$/src/Sikofitt/Config/ConfigTrait.php" />
|
<option value="$PROJECT_DIR$/src/Sikofitt/Config/ConfigTrait.php" />
|
||||||
<option value="$PROJECT_DIR$/src/Sikofitt/less/resume.less" />
|
<option value="$PROJECT_DIR$/src/Sikofitt/less/resume.less" />
|
||||||
<option value="$PROJECT_DIR$/app/config/config.yml" />
|
<option value="$PROJECT_DIR$/app/config/config.yml" />
|
||||||
<option value="$PROJECT_DIR$/app/views/resume.html.twig" />
|
|
||||||
<option value="$PROJECT_DIR$/Gruntfile.js" />
|
<option value="$PROJECT_DIR$/Gruntfile.js" />
|
||||||
<option value="$PROJECT_DIR$/app/views/uikit.html.twig" />
|
<option value="$PROJECT_DIR$/app/views/uikit.html.twig" />
|
||||||
<option value="$PROJECT_DIR$/web/index.php" />
|
<option value="$PROJECT_DIR$/web/index.php" />
|
||||||
|
@ -176,6 +181,7 @@
|
||||||
<option value="$PROJECT_DIR$/app_nginx.conf" />
|
<option value="$PROJECT_DIR$/app_nginx.conf" />
|
||||||
<option value="$PROJECT_DIR$/Procfile" />
|
<option value="$PROJECT_DIR$/Procfile" />
|
||||||
<option value="$PROJECT_DIR$/app/App.php" />
|
<option value="$PROJECT_DIR$/app/App.php" />
|
||||||
|
<option value="$PROJECT_DIR$/app/views/resume.html.twig" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
@ -221,6 +227,7 @@
|
||||||
</navigator>
|
</navigator>
|
||||||
<panes>
|
<panes>
|
||||||
<pane id="Scope" />
|
<pane id="Scope" />
|
||||||
|
<pane id="Scratches" />
|
||||||
<pane id="ProjectPane">
|
<pane id="ProjectPane">
|
||||||
<subPane>
|
<subPane>
|
||||||
<PATH>
|
<PATH>
|
||||||
|
@ -323,13 +330,12 @@
|
||||||
</PATH>
|
</PATH>
|
||||||
</subPane>
|
</subPane>
|
||||||
</pane>
|
</pane>
|
||||||
<pane id="Scratches" />
|
|
||||||
</panes>
|
</panes>
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">
|
<component name="PropertiesComponent">
|
||||||
<property name="WebServerToolWindowFactoryState" value="true" />
|
<property name="WebServerToolWindowFactoryState" value="true" />
|
||||||
<property name="js-jscs-nodeInterpreter" value="C:\Program Files\nodejs\node.exe" />
|
<property name="js-jscs-nodeInterpreter" value="C:\Program Files\nodejs\node.exe" />
|
||||||
<property name="settings.editor.selected.configurable" value="com.neon.intellij.plugins.gitlab.configurable" />
|
<property name="settings.editor.selected.configurable" value="preferences.sourceCode.Twig" />
|
||||||
<property name="settings.editor.splitter.proportion" value="0.2" />
|
<property name="settings.editor.splitter.proportion" value="0.2" />
|
||||||
<property name="nodejs_interpreter_path" value="/usr/local/bin/node" />
|
<property name="nodejs_interpreter_path" value="/usr/local/bin/node" />
|
||||||
</component>
|
</component>
|
||||||
|
@ -427,18 +433,19 @@
|
||||||
<workItem from="1467840020930" duration="1614000" />
|
<workItem from="1467840020930" duration="1614000" />
|
||||||
<workItem from="1467938148836" duration="1798000" />
|
<workItem from="1467938148836" duration="1798000" />
|
||||||
<workItem from="1468092833685" duration="3410000" />
|
<workItem from="1468092833685" duration="3410000" />
|
||||||
|
<workItem from="1468116337948" duration="1708000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="32337000" />
|
<option name="totallyTimeSpent" value="34045000" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="110" y="54" width="1701" height="893" extended-state="1" />
|
<frame x="110" y="54" width="1701" height="893" extended-state="0" />
|
||||||
<editor active="true" />
|
<editor active="true" />
|
||||||
<layout>
|
<layout>
|
||||||
<window_info id="Remote Host" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
<window_info id="Remote Host" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.26982176" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19545175" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
|
||||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32919955" sideWeight="0.41894352" order="0" side_tool="true" content_ui="tabs" />
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32919955" sideWeight="0.41894352" order="0" side_tool="true" content_ui="tabs" />
|
||||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
|
@ -502,7 +509,9 @@
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="2024">
|
<state relative-caret-position="2024">
|
||||||
<caret line="96" column="2" selection-start-line="96" selection-start-column="2" selection-end-line="96" selection-end-column="2" />
|
<caret line="96" column="2" selection-start-line="96" selection-start-column="2" selection-end-line="96" selection-end-column="2" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -510,10 +519,7 @@
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="0">
|
||||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
<folding>
|
<folding />
|
||||||
<marker date="1468031890670" expanded="true" signature="40:123" ph="{% block title ...%}" />
|
|
||||||
<marker date="1468031890670" expanded="true" signature="124:9986" ph="{% block body ...%}" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -529,7 +535,10 @@
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="330">
|
<state relative-caret-position="330">
|
||||||
<caret line="28" column="0" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" />
|
<caret line="28" column="0" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
<element signature="e#341#349#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -554,19 +563,7 @@
|
||||||
<state relative-caret-position="726">
|
<state relative-caret-position="726">
|
||||||
<caret line="33" column="7" selection-start-line="33" selection-start-column="7" selection-end-line="33" selection-end-column="7" />
|
<caret line="33" column="7" selection-start-line="33" selection-start-column="7" selection-end-line="33" selection-end-column="7" />
|
||||||
<folding>
|
<folding>
|
||||||
<marker date="1468031890671" expanded="true" signature="52:927" ph="..." />
|
<marker date="1468121015070" expanded="true" signature="768:877" ph="{% block javascripts_head ...%}" />
|
||||||
<marker date="1468031890671" expanded="true" signature="152:182" ph="{% block meta ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="192:229" ph="{% block title ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="240:359" ph="{% block shortcut_icon ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="362:482" ph="{% block apple_meta ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="537:574" ph="{% block stylesheets ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="577:616" ph="{% block inline_styles ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="768:877" ph="{% block javascripts_head ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="880:920" ph="{% block inline_js_head ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="935:1161" ph="..." />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1026:1069" ph="..." />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1030:1063" ph="{% block body ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1071:1113" ph="{% block javascripts_foot ...%}" />
|
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
@ -598,7 +595,9 @@
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="2024">
|
<state relative-caret-position="2024">
|
||||||
<caret line="96" column="2" selection-start-line="96" selection-start-column="2" selection-end-line="96" selection-end-column="2" />
|
<caret line="96" column="2" selection-start-line="96" selection-start-column="2" selection-end-line="96" selection-end-column="2" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -606,10 +605,7 @@
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="198">
|
<state relative-caret-position="198">
|
||||||
<caret line="9" column="29" selection-start-line="9" selection-start-column="29" selection-end-line="9" selection-end-column="29" />
|
<caret line="9" column="29" selection-start-line="9" selection-start-column="29" selection-end-line="9" selection-end-column="29" />
|
||||||
<folding>
|
<folding />
|
||||||
<marker date="1468031890670" expanded="true" signature="40:123" ph="{% block title ...%}" />
|
|
||||||
<marker date="1468031890670" expanded="true" signature="124:9986" ph="{% block body ...%}" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -625,7 +621,10 @@
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="308">
|
<state relative-caret-position="308">
|
||||||
<caret line="27" column="17" selection-start-line="27" selection-start-column="17" selection-end-line="27" selection-end-column="17" />
|
<caret line="27" column="17" selection-start-line="27" selection-start-column="17" selection-end-line="27" selection-end-column="17" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
<element signature="e#341#349#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -650,19 +649,7 @@
|
||||||
<state relative-caret-position="726">
|
<state relative-caret-position="726">
|
||||||
<caret line="33" column="7" selection-start-line="33" selection-start-column="7" selection-end-line="33" selection-end-column="7" />
|
<caret line="33" column="7" selection-start-line="33" selection-start-column="7" selection-end-line="33" selection-end-column="7" />
|
||||||
<folding>
|
<folding>
|
||||||
<marker date="1468031890671" expanded="true" signature="52:927" ph="..." />
|
<marker date="1468121015070" expanded="true" signature="768:877" ph="{% block javascripts_head ...%}" />
|
||||||
<marker date="1468031890671" expanded="true" signature="152:182" ph="{% block meta ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="192:229" ph="{% block title ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="240:359" ph="{% block shortcut_icon ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="362:482" ph="{% block apple_meta ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="537:574" ph="{% block stylesheets ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="577:616" ph="{% block inline_styles ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="768:877" ph="{% block javascripts_head ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="880:920" ph="{% block inline_js_head ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="935:1161" ph="..." />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1026:1069" ph="..." />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1030:1063" ph="{% block body ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1071:1113" ph="{% block javascripts_foot ...%}" />
|
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
@ -694,7 +681,9 @@
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="0">
|
||||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -702,7 +691,10 @@
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="308">
|
<state relative-caret-position="308">
|
||||||
<caret line="27" column="17" selection-start-line="27" selection-start-column="17" selection-end-line="27" selection-end-column="17" />
|
<caret line="27" column="17" selection-start-line="27" selection-start-column="17" selection-end-line="27" selection-end-column="17" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
<element signature="e#341#349#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -725,7 +717,9 @@
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="0">
|
||||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -799,7 +793,7 @@
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/app/config/config.yml">
|
<entry file="file://$PROJECT_DIR$/app/config/config.yml">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="88">
|
<state relative-caret-position="154">
|
||||||
<caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
|
<caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
|
@ -807,9 +801,12 @@
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/Sikofitt/Json/ResumeBuilder.php">
|
<entry file="file://$PROJECT_DIR$/src/Sikofitt/Json/ResumeBuilder.php">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="814">
|
<state relative-caret-position="484">
|
||||||
<caret line="37" column="0" selection-start-line="37" selection-start-column="0" selection-end-line="37" selection-end-column="0" />
|
<caret line="37" column="0" selection-start-line="37" selection-start-column="0" selection-end-line="37" selection-end-column="0" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
<element signature="e#341#349#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -821,55 +818,49 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/resume.html.twig">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="154">
|
|
||||||
<caret line="7" column="16" selection-start-line="7" selection-start-column="16" selection-end-line="7" selection-end-column="16" />
|
|
||||||
<folding>
|
|
||||||
<marker date="1468031890670" expanded="true" signature="40:123" ph="{% block title ...%}" />
|
|
||||||
<marker date="1468031890670" expanded="true" signature="124:9986" ph="{% block body ...%}" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/uikit.html.twig">
|
<entry file="file://$PROJECT_DIR$/app/views/uikit.html.twig">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="616">
|
<state relative-caret-position="660">
|
||||||
<caret line="30" column="6" selection-start-line="30" selection-start-column="6" selection-end-line="30" selection-end-column="6" />
|
<caret line="30" column="6" selection-start-line="30" selection-start-column="6" selection-end-line="30" selection-end-column="6" />
|
||||||
<folding>
|
<folding>
|
||||||
<marker date="1468031890671" expanded="true" signature="52:927" ph="..." />
|
<marker date="1468121015070" expanded="true" signature="768:877" ph="{% block javascripts_head ...%}" />
|
||||||
<marker date="1468031890671" expanded="true" signature="152:182" ph="{% block meta ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="192:229" ph="{% block title ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="240:359" ph="{% block shortcut_icon ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="362:482" ph="{% block apple_meta ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="537:574" ph="{% block stylesheets ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="577:616" ph="{% block inline_styles ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="768:877" ph="{% block javascripts_head ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="880:920" ph="{% block inline_js_head ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="935:1161" ph="..." />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1026:1069" ph="..." />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1030:1063" ph="{% block body ...%}" />
|
|
||||||
<marker date="1468031890671" expanded="true" signature="1071:1113" ph="{% block javascripts_foot ...%}" />
|
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/web/index.php">
|
<entry file="file://$PROJECT_DIR$/web/index.php">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="374">
|
<state relative-caret-position="220">
|
||||||
<caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
|
<caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="e#7#233#0#PHP" expanded="false" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/data/resume.json">
|
<entry file="file://$PROJECT_DIR$/data/resume.json">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="330">
|
<state relative-caret-position="990">
|
||||||
<caret line="45" column="45" selection-start-line="45" selection-start-column="45" selection-end-line="45" selection-end-column="45" />
|
<caret line="45" column="45" selection-start-line="45" selection-start-column="45" selection-end-line="45" selection-end-column="45" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app_nginx.conf">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="220">
|
||||||
|
<caret line="10" column="19" selection-start-line="10" selection-start-column="19" selection-end-line="10" selection-end-column="19" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/App.php">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="110">
|
||||||
|
<caret line="122" column="20" selection-start-line="122" selection-start-column="20" selection-end-line="122" selection-end-column="20" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/Procfile">
|
<entry file="file://$PROJECT_DIR$/Procfile">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="0">
|
<state relative-caret-position="0">
|
||||||
|
@ -878,14 +869,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/app_nginx.conf">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="220">
|
|
||||||
<caret line="10" column="19" selection-start-line="10" selection-start-column="19" selection-end-line="10" selection-end-column="19" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/package.json">
|
<entry file="file://$PROJECT_DIR$/package.json">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="396">
|
<state relative-caret-position="396">
|
||||||
|
@ -894,10 +877,10 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/app/App.php">
|
<entry file="file://$PROJECT_DIR$/app/views/resume.html.twig">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="462">
|
<state relative-caret-position="359">
|
||||||
<caret line="130" column="9" selection-start-line="130" selection-start-column="9" selection-end-line="130" selection-end-column="9" />
|
<caret line="231" column="20" selection-start-line="231" selection-start-column="20" selection-end-line="231" selection-end-column="20" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
29
app/App.php
29
app/App.php
|
@ -108,20 +108,19 @@ class App extends Application
|
||||||
$this['env'] = null !== $this->config('app.environment') ? $this->config('app.environment') : 'dev';
|
$this['env'] = null !== $this->config('app.environment') ? $this->config('app.environment') : 'dev';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function registerExtenders()
|
public function registerExtenders()
|
||||||
{
|
{
|
||||||
if (!$this['debug']) {
|
if (!$this['debug']) {
|
||||||
$this->error(function (\Exception $e, \Symfony\Component\HttpFoundation\Request $request, $code) {
|
$this->error(function (\Exception $e, \Symfony\Component\HttpFoundation\Request $request, $code) {
|
||||||
switch ($code) {
|
switch ($code) {
|
||||||
case 405:
|
case 405:
|
||||||
|
|
||||||
preg_match('/\(Allow\:(.+)\)/', $e->getMessage(), $matches);
|
preg_match('/\(Allow\:(.+)\)/', $e->getMessage(), $matches);
|
||||||
if(isset($matches[1])) {
|
if (isset($matches[1])) {
|
||||||
$matches = trim($matches[1]);
|
$matches = trim($matches[1]);
|
||||||
} elseif(isset($matches[0])) {
|
} elseif (isset($matches[0])) {
|
||||||
$matches = trim($matches[0]);
|
$matches = trim($matches[0]);
|
||||||
} else {
|
} else {
|
||||||
$matches = 'Available methods are unknown.';
|
$matches = 'Available methods are unknown.';
|
||||||
}
|
}
|
||||||
$message = json_encode(['status' => 'error', 'message' => 'Method not allowed', 'allowedMethods' => $matches, 'requestedMethod' => $request->getMethod(), 'code' => $code]);
|
$message = json_encode(['status' => 'error', 'message' => 'Method not allowed', 'allowedMethods' => $matches, 'requestedMethod' => $request->getMethod(), 'code' => $code]);
|
||||||
//$message = 'Sorry bout that.<br />' . $e->getMessage();
|
//$message = 'Sorry bout that.<br />' . $e->getMessage();
|
||||||
|
@ -131,10 +130,10 @@ class App extends Application
|
||||||
}
|
}
|
||||||
return new \Symfony\Component\HttpFoundation\Response($message, $code);
|
return new \Symfony\Component\HttpFoundation\Response($message, $code);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$this->extend('twig', function (\Twig_Environment $twig) {
|
$this->extend('twig', function (\Twig_Environment $twig) {
|
||||||
if ($this['debug']) {
|
if ($this['debug']) {
|
||||||
$twig->enableDebug();
|
$twig->enableDebug();
|
||||||
}
|
}
|
||||||
$twig->addExtension(new Twig_Extensions_Extension_Date());
|
$twig->addExtension(new Twig_Extensions_Extension_Date());
|
||||||
$twig->addExtension(new Sikofitt\Twig\Date());
|
$twig->addExtension(new Sikofitt\Twig\Date());
|
||||||
|
@ -142,10 +141,10 @@ class App extends Application
|
||||||
$twig->addGlobal('config', $this->config('all'));
|
$twig->addGlobal('config', $this->config('all'));
|
||||||
return $twig;
|
return $twig;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
$this->registerExtenders();
|
$this->registerExtenders();
|
||||||
// register default icons
|
// register default icons
|
||||||
$this->registerDefaultIcons();
|
$this->registerDefaultIcons();
|
||||||
return parent::boot();
|
return parent::boot();
|
||||||
|
|
|
@ -1,236 +1,251 @@
|
||||||
{% extends app.config.twig.template %}
|
{% extends app.config.twig.template %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{{ app.config.app.title | default('Resume') }}
|
{{ app.config.app.title | default('Resume') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<div class="uk-grid" data-uk-grid-margin>
|
<div class="uk-grid" data-uk-grid-margin>
|
||||||
<div class="uk-width-1-1">
|
<div class="uk-width-1-1">
|
||||||
<h1 class="uk-heading-large">
|
<h1 class="uk-heading-large">
|
||||||
{% if basics.name is not empty %}
|
{% if basics.name is not empty %}
|
||||||
{{ basics.name }}
|
{{ basics.name }}
|
||||||
|
{% else %}
|
||||||
|
{{ app.config.app.title|default('Resume') }}
|
||||||
|
{% endif %}
|
||||||
|
{% if basics.label is not empty %}
|
||||||
|
<small class="uk-h2 uk-align-right uk-text-bottom">{{ basics.label }}</small>
|
||||||
|
{% endif %}
|
||||||
|
</h1>
|
||||||
|
<hr/>
|
||||||
|
{% if basics.summary is not empty %}
|
||||||
|
<p class="uk-text-lead">{{ basics.summary }}</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="uk-grid" data-uk-grid-margin>
|
||||||
|
<div class="uk-width-medium-3-4">
|
||||||
|
<h1>Experience</h1>
|
||||||
|
<div class="uk-panel uk-panel-header">
|
||||||
|
|
||||||
|
<div class="resume-positions">
|
||||||
|
{% for position in work %}
|
||||||
|
<h3 class="company uk-panel-title uk-animation-slide-left">
|
||||||
|
{{ position.company }}
|
||||||
|
<small class="uk-align-right">
|
||||||
|
{{ position.startDate|date('Y') }} -
|
||||||
|
{% if position.endDate is not defined %}
|
||||||
|
Current
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ app.config.app.title|default('Resume') }}
|
{{ position.endDate|date('Y') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if basics.label is not empty %}
|
|
||||||
<small class="uk-h2 uk-align-right uk-text-bottom">{{ basics.label }}</small>
|
(~
|
||||||
|
{% if position.endDate is not defined %}
|
||||||
|
{{ position.startDate|date_diff }}
|
||||||
|
{% else %}
|
||||||
|
{{ position.startDate|date_diff(position.endDate) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
)
|
||||||
<hr/>
|
</small>
|
||||||
{% if basics.summary is not empty %}
|
</h3>
|
||||||
<p class="uk-text-lead">{{ basics.summary }}</p>
|
<h5>{{ position.position }}</h5>
|
||||||
|
<p class="summary uk-text-primary uk-text-large">
|
||||||
|
{{ position.summary|raw }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
{% if position.highlights is not empty and position.highlights is defined %}
|
||||||
|
<dl class="uk-description-list-horizontal uk-animation-slide-right">
|
||||||
|
<dt>Highlights</dt>
|
||||||
|
{% for highlight in position.highlights %}
|
||||||
|
<dd class="uk-margin-small-top uk-margin-small-bottom">{{ highlight|raw }} {# raw is deprecated in 2.0 #}</dd>
|
||||||
|
{% endfor %}
|
||||||
|
</dl>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<hr class="uk-hr-light"/>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-grid" data-uk-grid-margin>
|
<div class="uk-width-medium-1-4">
|
||||||
<div class="uk-width-medium-3-4">
|
|
||||||
<h1>Experience</h1>
|
|
||||||
<div class="uk-panel uk-panel-header">
|
|
||||||
|
|
||||||
<div class="resume-positions">
|
<div class="uk-panel uk-panel-header uk-panel-box" data-uk-sticky="{top:35}">
|
||||||
{% for position in work %}
|
|
||||||
<h3 class="company uk-panel-title uk-animation-slide-left">
|
|
||||||
{{ position.company }}
|
|
||||||
<small class="uk-align-right">
|
|
||||||
{{ position.startDate|date('Y') }} -
|
|
||||||
{% if position.endDate is not defined %}
|
|
||||||
Current
|
|
||||||
{% else %}
|
|
||||||
{{ position.endDate|date('Y') }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
(~
|
|
||||||
{% if position.endDate is not defined %}
|
|
||||||
{{ position.startDate|date_diff }}
|
|
||||||
{% else %}
|
|
||||||
{{ position.startDate|date_diff(position.endDate) }}
|
|
||||||
{% endif %}
|
|
||||||
)
|
|
||||||
</small>
|
|
||||||
</h3>
|
|
||||||
<h5>{{ position.position }}</h5>
|
|
||||||
<p class="summary uk-text-primary uk-text-large">
|
|
||||||
{{ position.summary|raw }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
{% if position.highlights is not empty and position.highlights is defined %}
|
<div class="uk-panel-image">
|
||||||
<dl class="uk-description-list-horizontal uk-animation-slide-right">
|
<img
|
||||||
<dt>Highlights</dt>
|
class="uk-align-right uk-thumbnail uk-border-circle uk-thumbnail-mini uk-animation-scale-up uk-img-preserve"
|
||||||
{% for highlight in position.highlights %}
|
src="{{ basics.picture }}"/>
|
||||||
<dd class="uk-margin-small-top uk-margin-small-bottom">{{ highlight|raw }} {# raw is deprecated in 2.0 #}</dd>
|
|
||||||
{% endfor %}
|
|
||||||
</dl>
|
|
||||||
{% endif %}
|
|
||||||
<hr class="uk-hr-light"/>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<h3 class="uk-panel-title">Contact</h3>
|
||||||
|
|
||||||
<div class="uk-width-medium-1-4">
|
|
||||||
|
|
||||||
<div class="uk-panel uk-panel-header uk-panel-box" data-uk-sticky="{top:35}">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="uk-panel-image">
|
|
||||||
<img class="uk-align-right uk-thumbnail uk-border-circle uk-thumbnail-mini uk-animation-scale-up uk-img-preserve"
|
|
||||||
src="{{ basics.picture }}"/>
|
|
||||||
</div>
|
|
||||||
<h3 class="uk-panel-title">Contact</h3>
|
|
||||||
|
|
||||||
<ul class="uk-list uk-list-line">
|
|
||||||
|
|
||||||
{% if app.config.app.email is not empty %}
|
|
||||||
|
|
||||||
<li class="uk-list-space"><a href="#captcha" class="hidden-email" data-uk-modal>[Hidden information]</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if basics.website is not empty %}
|
|
||||||
<li class="uk-list-space"><a href="{{ basics.website }}" target="_blank"
|
|
||||||
title="Home page">{{ basics.website }}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if basics.location|length > 0 and basics.location is not empty %}
|
|
||||||
<li class="uk-list-space">
|
|
||||||
<address>
|
|
||||||
{% set location = basics.location %}
|
|
||||||
|
|
||||||
{% if location.address is not empty %}
|
|
||||||
{{ location.address }}<br/>
|
|
||||||
{% endif %}
|
|
||||||
{% if location.city is not empty %}
|
|
||||||
{{ location.city }},
|
|
||||||
{% endif %}
|
|
||||||
{% if location.region is not empty %}
|
|
||||||
{{ location.region }},
|
|
||||||
{% endif %}
|
|
||||||
{% if location.countryCode is not empty %}
|
|
||||||
{{ location.countryCode }}
|
|
||||||
{% endif %}<br/>
|
|
||||||
|
|
||||||
</address>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
<li class="uk-list-space">
|
|
||||||
{% for profile in basics.profiles %}
|
|
||||||
{{ render_profile(profile)|raw }}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li class="uk-list-divider"></li>
|
|
||||||
</ul>
|
|
||||||
{% if skills is defined and skills is not empty %}
|
|
||||||
|
|
||||||
<h3 class="uk-panel-title">Skills</h3>
|
|
||||||
|
|
||||||
<dl class="uk-description-list-line">
|
|
||||||
{% for skill in skills %}
|
|
||||||
<dt class="uk-text-bold">{{ skill.name }}</dt>
|
|
||||||
<dd>{{ skill.keywords|join(', ')|raw }}</dd>
|
|
||||||
{% endfor %}
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div id="captcha" class="uk-modal">
|
|
||||||
<div class="uk-modal-dialog uk-modal-dialog-blank">
|
|
||||||
<button class="uk-modal-close uk-close" type="button"></button>
|
|
||||||
|
|
||||||
<div class="uk-grid uk-flex-center uk-grid-match uk-grid-divider uk-flex-middle uk-height-viewport uk-cover-background" data-uk-grid-match>
|
|
||||||
|
|
||||||
<div id="recaptcha-wrapper">
|
|
||||||
<h1>Verify</h1>
|
|
||||||
<div>
|
|
||||||
<p> Verify that you are a human please.</p>
|
|
||||||
<form class="uk-form" id="recaptcha" method="post" action="/api/v1/captcha" onsubmit="return false;">
|
|
||||||
<div class="uk-form-row">
|
|
||||||
<div class="g-recaptcha" data-sitekey="6LcvmSQTAAAAAMmf9w6mhCbpdLvknuD9SGVHT0q-"></div>
|
|
||||||
</div>
|
|
||||||
<div class="uk-form-row">
|
|
||||||
<input type="submit" class="uk-button" id="submit" name="submit" value="Verify" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="offcanvas" class="uk-offcanvas">
|
|
||||||
<div class="uk-offcanvas-bar">
|
|
||||||
<ul class="uk-list uk-list-line">
|
<ul class="uk-list uk-list-line">
|
||||||
{% if basics.email is not empty %}
|
|
||||||
<li>{{ basics.email }}</li>
|
|
||||||
{% endif %}
|
|
||||||
{% if basics.phone is not empty %}
|
|
||||||
<li>{{ basics.phone }}</li>
|
|
||||||
{% endif %}
|
|
||||||
{% if basics.location|length > 0 and basics.location is not empty %}
|
|
||||||
<li>
|
|
||||||
<address>
|
|
||||||
{% for location in basics.location %}
|
|
||||||
{% if location.address is not empty %}
|
|
||||||
{{ location.address }}<br/>
|
|
||||||
{% endif %}
|
|
||||||
{% if location.city is not empty %}
|
|
||||||
{{ location.city }}
|
|
||||||
{% if location.postalCode is not empty %}
|
|
||||||
{{ location.postalCode }}
|
|
||||||
{% endif %}
|
|
||||||
{% if location.countryCode is not empty %}
|
|
||||||
{{ location.countryCode }}
|
|
||||||
{% endif %}<br/>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</address>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
<li>
|
|
||||||
|
|
||||||
|
{% if app.config.app.phone is not empty %}
|
||||||
|
|
||||||
|
<li class="uk-list-space"><a href="#captcha" class="hidden-phone" data-uk-modal>Phone</a></li>
|
||||||
|
{% endif %}
|
||||||
|
{% if basics.email is not empty %}
|
||||||
|
<li class="uk-list-space"><a href="mailto:{{ basics.email }}">{{ basics.email }}</a></li>
|
||||||
|
{% endif %}
|
||||||
|
{% if basics.website is not empty %}
|
||||||
|
<li class="uk-list-space"><a href="{{ basics.website }}" target="_blank"
|
||||||
|
title="Home page">{{ basics.website }}</a></li>
|
||||||
|
{% endif %}
|
||||||
|
{% if basics.location|length > 0 and basics.location is not empty %}
|
||||||
|
<li class="uk-list-space">
|
||||||
|
<address>
|
||||||
|
{% set location = basics.location %}
|
||||||
|
|
||||||
|
{% if location.address is not empty %}
|
||||||
|
{{ location.address }}<br/>
|
||||||
|
{% endif %}
|
||||||
|
{% if location.city is not empty %}
|
||||||
|
{{ location.city }},
|
||||||
|
{% endif %}
|
||||||
|
{% if location.region is not empty %}
|
||||||
|
{{ location.region }},
|
||||||
|
{% endif %}
|
||||||
|
{% if location.countryCode is not empty %}
|
||||||
|
{{ location.countryCode }}
|
||||||
|
{% endif %}<br/>
|
||||||
|
|
||||||
|
</address>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
<li class="uk-list-space">
|
||||||
|
{% for profile in basics.profiles %}
|
||||||
|
{{ render_profile(profile)|raw }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li class="uk-list-divider"></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
{% if skills is defined and skills is not empty %}
|
||||||
|
|
||||||
|
<h3 class="uk-panel-title">Skills</h3>
|
||||||
|
|
||||||
|
<dl class="uk-description-list-line">
|
||||||
|
{% for skill in skills %}
|
||||||
|
<dt class="uk-text-bold">{{ skill.name }}</dt>
|
||||||
|
<dd>{{ skill.keywords|join(', ')|raw }}</dd>
|
||||||
|
{% endfor %}
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="captcha" class="uk-modal">
|
||||||
|
<div class="uk-modal-dialog uk-modal-dialog-blank">
|
||||||
|
<button class="uk-modal-close uk-close" type="button"></button>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="uk-grid uk-flex-center uk-grid-match uk-grid-divider uk-flex-middle uk-height-viewport uk-cover-background"
|
||||||
|
data-uk-grid-match>
|
||||||
|
|
||||||
|
<div id="recaptcha-wrapper">
|
||||||
|
<h1>Verify</h1>
|
||||||
|
<div>
|
||||||
|
<p> Verify that you are a human please.</p>
|
||||||
|
<form class="uk-form" id="recaptcha" method="post" action="/api/v1/captcha" onsubmit="return false;">
|
||||||
|
<div class="uk-form-row">
|
||||||
|
<div class="g-recaptcha" data-sitekey="6LcvmSQTAAAAAMmf9w6mhCbpdLvknuD9SGVHT0q-"></div>
|
||||||
|
</div>
|
||||||
|
<div class="uk-form-row">
|
||||||
|
<input type="submit" class="uk-button" id="submit" name="submit" value="Verify"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="offcanvas" class="uk-offcanvas">
|
||||||
|
<div class="uk-offcanvas-bar">
|
||||||
|
<ul class="uk-list uk-list-line">
|
||||||
|
{% if basics.email is not empty %}
|
||||||
|
<li>{{ basics.email }}</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if basics.phone is not empty %}
|
||||||
|
<li>{{ basics.phone }}</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if basics.location|length > 0 and basics.location is not empty %}
|
||||||
|
<li>
|
||||||
|
<address>
|
||||||
|
{% for location in basics.location %}
|
||||||
|
{% if location.address is not empty %}
|
||||||
|
{{ location.address }}<br/>
|
||||||
|
{% endif %}
|
||||||
|
{% if location.city is not empty %}
|
||||||
|
{{ location.city }}
|
||||||
|
{% if location.postalCode is not empty %}
|
||||||
|
{{ location.postalCode }}
|
||||||
|
{% endif %}
|
||||||
|
{% if location.countryCode is not empty %}
|
||||||
|
{{ location.countryCode }}
|
||||||
|
{% endif %}<br/>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</address>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
<li>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block javascripts_foot %}
|
{% block javascripts_foot %}
|
||||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block inline_js_foot %}
|
{% block inline_js_foot %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function ($) {
|
||||||
jQuery('form#recaptcha').on('submit', function(event) {
|
jQuery('form#recaptcha').on('submit', function (event) {
|
||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
jQuery.post(jQuery(this).attr('action'), jQuery(this).serialize(), function(response) {
|
jQuery.post(jQuery(this).attr('action'), jQuery(this).serialize(), function (response) {
|
||||||
|
|
||||||
data = JSON.parse(response);
|
data = JSON.parse(response);
|
||||||
if(false === data.valid) {
|
if (false === data.valid) {
|
||||||
data.message.every(function (d) {
|
data.message.every(function (d) {
|
||||||
UIkit.notify('<i class="uk-icon-medium uk-icon-frown-o uk-icon-justify"></i> ' + d, {pos:'bottom-center', status: 'danger'});
|
UIkit.notify('<i class="uk-icon-medium uk-icon-frown-o uk-icon-justify"></i> ' + d, {
|
||||||
})
|
pos: 'bottom-center',
|
||||||
} else if(true === data.valid) {
|
status: 'danger'
|
||||||
var divRoot = jQuery('<div />');
|
});
|
||||||
var h1 = jQuery('<h1 />');
|
})
|
||||||
h1.append(data.message.email);
|
} else if (true === data.valid) {
|
||||||
var h2 = jQuery('<h2 />');
|
var divRoot = jQuery('<div />');
|
||||||
h2.append(data.message.phone);
|
var h1 = jQuery('<h1 />');
|
||||||
divRoot.append(h1).append(h2);
|
var href = jQuery('<a />');
|
||||||
jQuery('#recaptcha-wrapper').replaceWith(divRoot);
|
href
|
||||||
}
|
.attr('href', 'tel:' + data.message.phone)
|
||||||
});
|
.text(data.message.phone);
|
||||||
});
|
|
||||||
|
h1.append(href);
|
||||||
|
phone = jQuery('.hidden-phone');
|
||||||
|
phone.attr('href', 'tel:' + data.message.phone);
|
||||||
|
phone.text(data.message.phone);
|
||||||
|
divRoot.append(h1);
|
||||||
|
jQuery('#recaptcha-wrapper').replaceWith(divRoot);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -8,6 +8,7 @@
|
||||||
"grunt-contrib-clean": "^1.0.0",
|
"grunt-contrib-clean": "^1.0.0",
|
||||||
"grunt-contrib-copy": "^1.0.0",
|
"grunt-contrib-copy": "^1.0.0",
|
||||||
"grunt-contrib-less": "^1.3.0",
|
"grunt-contrib-less": "^1.3.0",
|
||||||
|
"grunt-contrib-uglify": "^1.0.1",
|
||||||
"grunt-contrib-watch": "^1.0.0",
|
"grunt-contrib-watch": "^1.0.0",
|
||||||
"grunt-phpunit": "^0.3.6",
|
"grunt-phpunit": "^0.3.6",
|
||||||
"less-plugin-autoprefix": "^1.5.1",
|
"less-plugin-autoprefix": "^1.5.1",
|
||||||
|
@ -16,5 +17,4 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "npm install -g grunt; npm install -g bower; .heroku/node/bin/bower install; .heroku/node/bin/grunt; .heroku/node/bin/grunt copy"
|
"postinstall": "npm install -g grunt; npm install -g bower; .heroku/node/bin/bower install; .heroku/node/bin/grunt; .heroku/node/bin/grunt copy"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Resume.PHP.
|
||||||
|
*
|
||||||
|
* (copyleft) R. Eric Wheeler <sikofitt@gmail.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of test.
|
* This file is part of test.
|
||||||
*
|
*
|
||||||
|
@ -15,29 +25,31 @@
|
||||||
namespace Sikofitt\Controller;
|
namespace Sikofitt\Controller;
|
||||||
|
|
||||||
use ReCaptcha\ReCaptcha;
|
use ReCaptcha\ReCaptcha;
|
||||||
use Silex\Application;
|
|
||||||
use Silex\Api\ControllerProviderInterface;
|
use Silex\Api\ControllerProviderInterface;
|
||||||
|
use Silex\Application;
|
||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
class ApiControllerProvider implements ControllerProviderInterface {
|
class ApiControllerProvider implements ControllerProviderInterface
|
||||||
|
{
|
||||||
|
|
||||||
public function connect(Application $app) {
|
public function connect(Application $app)
|
||||||
$controllers = $app['controllers_factory'];
|
{
|
||||||
|
$controllers = $app['controllers_factory'];
|
||||||
|
|
||||||
$controllers->get('/v1/schema', function() {
|
$controllers->get('/v1/schema', function () {
|
||||||
return new \Symfony\Component\HttpFoundation\Response('Success!');
|
return new \Symfony\Component\HttpFoundation\Response('Success!');
|
||||||
});
|
});
|
||||||
|
|
||||||
$controllers->post('/v1/captcha', function(Request $request) use ($app) {
|
$controllers->post('/v1/captcha', function (Request $request) use ($app) {
|
||||||
$captcha = new ReCaptcha('6LcvmSQTAAAAAITkvYJjgLar1LqGGLz-ic0ZMiXo');
|
$captcha = new ReCaptcha('6LcvmSQTAAAAAITkvYJjgLar1LqGGLz-ic0ZMiXo');
|
||||||
|
|
||||||
$valid = $captcha->verify(
|
$valid = $captcha->verify(
|
||||||
$request->request->get('g-recaptcha-response'),
|
$request->request->get('g-recaptcha-response'),
|
||||||
$request->server->get('REMOTE_ADDR')
|
$request->server->get('REMOTE_ADDR')
|
||||||
);
|
);
|
||||||
if($valid->isSuccess()) {
|
if ($valid->isSuccess()) {
|
||||||
$return = [
|
$return = [
|
||||||
'valid' => true,
|
'valid' => true,
|
||||||
'message' => [
|
'message' => [
|
||||||
'email' => null !== $app->config('app.email') ? $app->config('app.email') : 'No email has been set in the configuration. Please let the owner know.',
|
'email' => null !== $app->config('app.email') ? $app->config('app.email') : 'No email has been set in the configuration. Please let the owner know.',
|
||||||
|
@ -45,24 +57,22 @@ class ApiControllerProvider implements ControllerProviderInterface {
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
|
$errorCodes = [
|
||||||
$errorCodes = [
|
|
||||||
'missing-input-secret' => 'The secret parameter is missing.',
|
'missing-input-secret' => 'The secret parameter is missing.',
|
||||||
'invalid-input-secret' => 'The secret parameter is invalid or malformed.',
|
'invalid-input-secret' => 'The secret parameter is invalid or malformed.',
|
||||||
'missing-input-response' =>'The response parameter is missing.',
|
'missing-input-response' =>'The response parameter is missing.',
|
||||||
'invalid-input-response' => 'The response parameter is invalid or malformed.'
|
'invalid-input-response' => 'The response parameter is invalid or malformed.'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach($valid->getErrorCodes() as $code)
|
foreach ($valid->getErrorCodes() as $code) {
|
||||||
{
|
if (array_key_exists($code, $errorCodes)) {
|
||||||
if(array_key_exists($code, $errorCodes)) {
|
$errors[] = $errorCodes[$code];
|
||||||
$errors[] = $errorCodes[$code];
|
}
|
||||||
}
|
}
|
||||||
}
|
if (!isset($errors)) {
|
||||||
if(!isset($errors)) {
|
$errors[] = 'An unknown error occurred.';
|
||||||
$errors[] = 'An unknown error occurred.';
|
}
|
||||||
}
|
$return = [
|
||||||
$return = [
|
|
||||||
'valid' => false,
|
'valid' => false,
|
||||||
'message' => $errors,
|
'message' => $errors,
|
||||||
];
|
];
|
||||||
|
@ -71,6 +81,6 @@ class ApiControllerProvider implements ControllerProviderInterface {
|
||||||
return new JsonResponse(json_encode($return));
|
return new JsonResponse(json_encode($return));
|
||||||
});
|
});
|
||||||
|
|
||||||
return $controllers;
|
return $controllers;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue