Added Registry UML

This commit is contained in:
John Webb 2014-07-29 11:22:48 -05:00
parent d0616c7937
commit 6dd33fd433
6 changed files with 18 additions and 4 deletions

View File

@ -9,3 +9,7 @@ To write code that is easy readable just like sentences in a natural language (l
* Doctrine2's QueryBuilder works something like that example class below
* PHPUnit uses fluent interfaces to build mock objects
* Yii Framework: CDbCommand and CActiveRecord use this pattern, too
## UML Diagram
![Alt FluentInterface UML Diagram](uml/uml.png)

View File

@ -14,7 +14,3 @@ entities.
* [FluentInterface](FluentInterface) [:notebook:](http://en.wikipedia.org/wiki/Fluent_interface)
* [Proxy](Proxy) [:notebook:](http://en.wikipedia.org/wiki/Proxy_pattern)
* [Registry](Registry) [:notebook:](http://en.wikipedia.org/wiki/Service_locator_pattern)
## UML Diagram
![Alt FluentInterface UML Diagram](uml/uml.png)

View File

@ -9,3 +9,7 @@ an abstract class with only static methods (or using the Singleton pattern)
* Zend Framework: `Zend_Registry` holds the application's logger object, front controller etc.
* Yii Framework: `CWebApplication` holds all the application components, such as `CWebUser`, `CUrlManager`, etc.
## UML Diagram
![Alt Registry UML Diagram](uml/uml.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="104pt" style="width:294px;height:104px;" version="1.1" viewBox="0 0 294 104" width="294pt"><defs><filter height="300%" id="f1" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#FEFECE" filter="url(#f1)" height="86.8652" style="stroke: #A80036; stroke-width: 1.5;" width="279" x="6" y="8.5"/><ellipse cx="118.25" cy="24.5" fill="#A9DCDF" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M118.3633,19.8481 L117.2095,24.9199 L119.5254,24.9199 Z M116.8691,17.6069 L119.8657,17.6069 L123.2109,30 L120.7622,30 L119.9985,26.937 L116.7197,26.937 L115.9727,30 L113.5239,30 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacingAndGlyphs" textLength="46" x="138.75" y="29.0352">Registry</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="284" y1="40.5" y2="40.5"/><polygon fill="none" points="17,47.4775,21,51.4775,17,55.4775,13,51.4775" style="stroke: #B38D22; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="149" x="26" y="55.1348">static $storedValues : array;</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="284" y1="61.4551" y2="61.4551"/><ellipse cx="17" cy="73.4326" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="253" x="26" y="76.0898">static function set($key : string, $value : mixed)</text><ellipse cx="17" cy="86.3877" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="171" x="26" y="89.0449">static function get($key : string)</text></g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,9 @@
@startuml
abstract class Registry {
#static $storedValues : array;
+static function set($key : string, $value : mixed)
+static function get($key : string)
}
@enduml