Commit e8143907 authored by Josh Pollock's avatar Josh Pollock
Browse files

basic readme

parent 39afa6fe
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="39e46151-e7c1-422c-b495-7bbe1c526bbf" name="Default" comment=""> <list default="true" id="39e46151-e7c1-422c-b495-7bbe1c526bbf" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/README.MD" />
<change type="MOVED" beforePath="$PROJECT_DIR$/src/Exceptions/ContainerException.php" afterPath="$PROJECT_DIR$/src/Exceptions/NotFoundException.php" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Container.php" afterPath="$PROJECT_DIR$/src/Container.php" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Container.php" afterPath="$PROJECT_DIR$/src/Container.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Exceptions/Exception.php" afterPath="$PROJECT_DIR$/src/Exceptions/Exception.php" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" /> <option name="TRACKING_ENABLED" value="true" />
...@@ -16,16 +15,6 @@ ...@@ -16,16 +15,6 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf> <leaf>
<file leaf-file-name="ServiceServiceContainerTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Tests/ServiceServiceContainerTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="400">
<caret line="83" column="5" lean-forward="false" selection-start-line="83" selection-start-column="5" selection-end-line="83" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="bootstrap.php" pinned="false" current-in-tab="false"> <file leaf-file-name="bootstrap.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Tests/bootstrap.php"> <entry file="file://$PROJECT_DIR$/Tests/bootstrap.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
...@@ -36,73 +25,24 @@ ...@@ -36,73 +25,24 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Container.php" pinned="false" current-in-tab="false"> <file leaf-file-name="README.MD" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Service/Container.php"> <entry file="file://$PROJECT_DIR$/README.MD">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state relative-caret-position="63"> <state split_layout="SPLIT">
<caret line="10" column="29" lean-forward="true" selection-start-line="10" selection-start-column="29" selection-end-line="10" selection-end-column="29" /> <first_editor relative-caret-position="225">
<folding /> <caret line="15" column="26" lean-forward="false" selection-start-line="15" selection-start-column="26" selection-end-line="15" selection-end-column="26" />
</state> <folding />
</provider> </first_editor>
</entry> <second_editor />
</file>
<file leaf-file-name="ControlledContainer.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/ControlledContainer.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name=".gitignore" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Container.php" pinned="false" current-in-tab="false"> <file leaf-file-name="Container.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Container.php"> <entry file="file://$PROJECT_DIR$/src/Service/Container.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="16" column="67" lean-forward="true" selection-start-line="16" selection-start-column="67" selection-end-line="16" selection-end-column="67" />
<folding>
<element signature="e#48#109#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ContainerInterface.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/vendor/psr/container/src/ContainerInterface.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="18" column="36" lean-forward="true" selection-start-line="18" selection-start-column="36" selection-end-line="18" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ContainerExceptionInterface.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/vendor/psr/container/src/ContainerExceptionInterface.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="10" column="37" lean-forward="false" selection-start-line="10" selection-start-column="10" selection-end-line="10" selection-end-column="37" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Exception.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Exceptions/Exception.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150"> <state relative-caret-position="45">
<caret line="10" column="91" lean-forward="false" selection-start-line="10" selection-start-column="91" selection-end-line="10" selection-end-column="91" /> <caret line="3" column="45" lean-forward="false" selection-start-line="3" selection-start-column="10" selection-end-line="3" selection-end-column="45" />
<folding /> <folding />
</state> </state>
</provider> </provider>
...@@ -155,9 +95,10 @@ ...@@ -155,9 +95,10 @@
<option value="$PROJECT_DIR$/src/Interfaces/ProvidesService.php" /> <option value="$PROJECT_DIR$/src/Interfaces/ProvidesService.php" />
<option value="$PROJECT_DIR$/Tests/ServiceServiceContainerTest.php" /> <option value="$PROJECT_DIR$/Tests/ServiceServiceContainerTest.php" />
<option value="$PROJECT_DIR$/src/ControlledContainer.php" /> <option value="$PROJECT_DIR$/src/ControlledContainer.php" />
<option value="$PROJECT_DIR$/src/Container.php" />
<option value="$PROJECT_DIR$/src/Exceptions/NotFoundException.php" /> <option value="$PROJECT_DIR$/src/Exceptions/NotFoundException.php" />
<option value="$PROJECT_DIR$/src/Exceptions/Exception.php" /> <option value="$PROJECT_DIR$/src/Exceptions/Exception.php" />
<option value="$PROJECT_DIR$/src/Container.php" />
<option value="$PROJECT_DIR$/README.MD" />
</list> </list>
</option> </option>
</component> </component>
...@@ -204,35 +145,12 @@ ...@@ -204,35 +145,12 @@
<item name="caldera-container" type="2a2b976b:PhpTreeStructureProvider$1" /> <item name="caldera-container" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="src" type="2a2b976b:PhpTreeStructureProvider$1" /> <item name="src" type="2a2b976b:PhpTreeStructureProvider$1" />
</path> </path>
<path>
<item name="caldera-container" type="b2602c69:ProjectViewProjectNode" />
<item name="caldera-container" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="src" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="Exceptions" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="caldera-container" type="b2602c69:ProjectViewProjectNode" />
<item name="caldera-container" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="src" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="Interfaces" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path> <path>
<item name="caldera-container" type="b2602c69:ProjectViewProjectNode" /> <item name="caldera-container" type="b2602c69:ProjectViewProjectNode" />
<item name="caldera-container" type="2a2b976b:PhpTreeStructureProvider$1" /> <item name="caldera-container" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="src" type="2a2b976b:PhpTreeStructureProvider$1" /> <item name="src" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="Service" type="2a2b976b:PhpTreeStructureProvider$1" /> <item name="Service" type="2a2b976b:PhpTreeStructureProvider$1" />
</path> </path>
<path>
<item name="caldera-container" type="b2602c69:ProjectViewProjectNode" />
<item name="caldera-container" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="Tests" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="caldera-container" type="b2602c69:ProjectViewProjectNode" />
<item name="caldera-container" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="Tests" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="Mocks" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
</expand> </expand>
<select /> <select />
</subPane> </subPane>
...@@ -276,12 +194,12 @@ ...@@ -276,12 +194,12 @@
<option name="number" value="Default" /> <option name="number" value="Default" />
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1522953897768</updated> <updated>1522953897768</updated>
<workItem from="1522953898944" duration="1874000" /> <workItem from="1522953898944" duration="2319000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="1874000" /> <option name="totallyTimeSpent" value="2319000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="618" y="22" width="1296" height="1007" extended-state="0" /> <frame x="618" y="22" width="1296" height="1007" extended-state="0" />
...@@ -415,14 +333,6 @@ ...@@ -415,14 +333,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Exceptions/NotImplemented.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="14" column="0" lean-forward="true" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Tests/ServiceFactoryTest.php"> <entry file="file://$PROJECT_DIR$/Tests/ServiceFactoryTest.php">
<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">
...@@ -475,87 +385,106 @@ ...@@ -475,87 +385,106 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/Tests/bootstrap.php"> <entry file="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/Core/Core_c.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300"> <state relative-caret-position="59">
<caret line="20" column="0" lean-forward="true" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" /> <caret line="258" column="6" lean-forward="false" selection-start-line="258" selection-start-column="6" selection-end-line="258" selection-end-column="6" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Service/Container.php"> <entry file="file://$PROJECT_DIR$/src/Exceptions/NotFoundException.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="63"> <state relative-caret-position="150">
<caret line="10" column="29" lean-forward="true" selection-start-line="10" selection-start-column="29" selection-end-line="10" selection-end-column="29" /> <caret line="10" column="53" lean-forward="false" selection-start-line="10" selection-start-column="53" selection-end-line="10" selection-end-column="53" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/ControlledContainer.php"> <entry file="file://$PROJECT_DIR$/src/Exceptions/NotImplemented.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60"> <state relative-caret-position="210">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" /> <caret line="14" column="0" lean-forward="true" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/.gitignore"> <entry file="file://$PROJECT_DIR$/src/Exceptions/Exception.php">
<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="150">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="10" column="91" lean-forward="false" selection-start-line="10" selection-start-column="91" selection-end-line="10" selection-end-column="91" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/Core/Core_c.php"> <entry file="file://$PROJECT_DIR$/vendor/psr/container/src/ContainerExceptionInterface.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="59"> <state relative-caret-position="120">
<caret line="258" column="6" lean-forward="false" selection-start-line="258" selection-start-column="6" selection-end-line="258" selection-end-column="6" /> <caret line="10" column="37" lean-forward="false" selection-start-line="10" selection-start-column="10" selection-end-line="10" selection-end-column="37" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Container.php"> <entry file="file://$PROJECT_DIR$/vendor/psr/container/src/ContainerInterface.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240"> <state relative-caret-position="240">
<caret line="16" column="67" lean-forward="true" selection-start-line="16" selection-start-column="67" selection-end-line="16" selection-end-column="67" /> <caret line="18" column="36" lean-forward="true" selection-start-line="18" selection-start-column="36" selection-end-line="18" selection-end-column="36" />
<folding> <folding />
<element signature="e#48#109#0#PHP" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Exceptions/NotFoundException.php"> <entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150"> <state relative-caret-position="0">
<caret line="10" column="53" lean-forward="false" selection-start-line="10" selection-start-column="53" selection-end-line="10" selection-end-column="53" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/vendor/psr/container/src/ContainerInterface.php"> <entry file="file://$PROJECT_DIR$/Tests/bootstrap.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240"> <state relative-caret-position="300">
<caret line="18" column="36" lean-forward="true" selection-start-line="18" selection-start-column="36" selection-end-line="18" selection-end-column="36" /> <caret line="20" column="0" lean-forward="true" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/vendor/psr/container/src/ContainerExceptionInterface.php"> <entry file="file://$PROJECT_DIR$/src/Container.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120"> <state relative-caret-position="225">
<caret line="10" column="37" lean-forward="false" selection-start-line="10" selection-start-column="10" selection-end-line="10" selection-end-column="37" /> <caret line="15" column="53" lean-forward="false" selection-start-line="15" selection-start-column="37" selection-end-line="15" selection-end-column="53" />
<folding>
<element signature="e#47#108#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ControlledContainer.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="34" lean-forward="false" selection-start-line="11" selection-start-column="15" selection-end-line="11" selection-end-column="34" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Exceptions/Exception.php"> <entry file="file://$PROJECT_DIR$/src/Service/Container.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150"> <state relative-caret-position="45">
<caret line="10" column="91" lean-forward="false" selection-start-line="10" selection-start-column="91" selection-end-line="10" selection-end-column="91" /> <caret line="3" column="45" lean-forward="false" selection-start-line="3" selection-start-column="10" selection-end-line="3" selection-end-column="45" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/README.MD">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="225">
<caret line="15" column="26" lean-forward="false" selection-start-line="15" selection-start-column="26" selection-end-line="15" selection-end-column="26" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</component> </component>
</project> </project>
\ No newline at end of file
# Caldera Containers
A collection of useful containers.
## Containers
* `calderawp\CalderaContainers\Container`
Basic PSR-11 compatible container decorating Pimple.
- Is abstract.
- Converts to arrays. `calderawp\CalderaContainers\Interfaces\Arrayable`
- Converts to JSON. `JsonSerializable`
* `calderawp\CalderaContainers\ControlledContainer`
Extends the base container but only allows in specified attributes.
- Is abstract
* `calderawp\CalderaContainers\Service\Coantainer`
A basic service container.
## Stuff.
Copyright 2018 CalderaWP LLC. License: GPL v2 or later.
<?php <?php
namespace calderawp\CalderaContainers; namespace calderawp\CalderaContainers;
use calderawp\CalderaContainers\Exceptions\NotFoundException; use calderawp\CalderaContainers\Exceptions\NotFoundException;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment