├── 01. DIP └── Main.java ├── 02. Factory-Method-Pattern ├── Breakfast.java ├── BreakfastJoint.java ├── CaLaChickenBurger.java ├── GarlicChiliSpaghetti.java ├── HaBoBoBreakfastJoint.java ├── Main.java ├── MilkTea.java └── People.java ├── 03. IoC-DI ├── Computer.java ├── Game.java ├── GameInjector.java ├── Main.java ├── ServiceContainer.java ├── 爆爆王.java └── 英雄聯盟.java ├── 04. Command-Pattern ├── Main.java ├── logger │ ├── FileLogger.java │ └── Logger.java └── restaurant │ ├── customer │ └── input │ │ ├── CheckHandler.java │ │ ├── ConcreteCreator.java │ │ ├── ExitHandler.java │ │ ├── Handler.java │ │ ├── HandlerCreator.java │ │ ├── OkHandler.java │ │ ├── OtherHandler.java │ │ ├── PorkHandler.java │ │ ├── SteakHandler.java │ │ └── UndoHandler.java │ ├── 命令.java │ ├── 廚師.java │ ├── 服務生.java │ ├── 餐廳.java │ ├── 點牛排命令.java │ └── 點豬排命令.java ├── 05. ADT ├── Main.java └── Stack.java ├── 06. Arg-Echo ├── ArgEcho └── ArgEcho.c ├── 07. Three-way-Handshake ├── 1. SYN.txt ├── 2. SYN+ACK.txt └── 3. ACK.txt ├── 09. Recursion ├── 9.1 線性遞迴 - int 陣列總和 │ ├── IntArraySum.java │ ├── Main.java │ ├── NonRecursiveFunction.java │ └── RecursiveFunction.java ├── 9.2 尾端遞迴 - 自然數總和 │ ├── Main.java │ ├── NonRecursiveFunction.java │ ├── PartialSumsA.java │ ├── PartialSumsB.java │ └── RecursiveFunction.java ├── 9.3 經典遞迴 - 費式數列 │ ├── Fib.java │ ├── Main.java │ ├── NonRecursiveFunction.java │ └── RecursiveFunction.java └── 9.4 經典遞迴 - 河內塔 │ ├── HanoiTower.java │ ├── Main.java │ └── RecursiveFunction.java ├── 10. Observer-Pattern ├── ConcreteObserverA.java ├── ConcreteObserverB.java ├── ConcreteObserverC.java ├── ConcreteSubject.java ├── Main.java ├── Observer.java └── Subject.java ├── 14. Numeral-System-Intro └── Main.java ├── 19. Byte-Order ├── CheckByteOrder │ ├── C │ │ ├── check_byte_order.c │ │ └── check_byte_order2.c │ ├── Java │ │ └── main.java │ ├── JavaScript │ │ └── checkByteOrder.js │ └── PHP │ │ └── check_byte_order.php └── Network-Byte-Order-Conversion │ └── main.c ├── 29. XMLHttpRequest ├── 01. GET.html ├── 02. OverrideMimeType.html ├── 03. Blob.html ├── 04. POST.html ├── 05. Send-Unicode.html ├── encodeFormData.js └── its-you.jpg ├── 30. jQuery-Ajax ├── 01. GET.html ├── 02. Promise-Chain.html ├── 03. async-and-await.html ├── 04. GET (async-awiat).html ├── 05. POST.html ├── 06. POST-async-version.html ├── 07. Ajax.html ├── 08. Ajax-async-version.html └── 09. Encapsulate-XHR-to-Promise.html ├── 31. Fetch-API ├── 01. Fetch-API.html ├── 02. Blob.html ├── 03. Clone.html ├── 04.POST.html ├── Nobita.jpg ├── css │ └── style.css ├── img │ └── GitHub-Mark.png ├── index.html └── lib │ ├── polyfill.min.js │ └── vm.js ├── 32. Server-Cache ├── 01. 抽象語法樹 (AST) │ ├── composer.json │ ├── composer.lock │ ├── index.php │ ├── result.html │ └── vendor │ │ ├── autoload.php │ │ ├── bin │ │ └── php-parse │ │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ │ └── nikic │ │ └── php-parser │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── UPGRADE-1.0.md │ │ ├── UPGRADE-2.0.md │ │ ├── UPGRADE-3.0.md │ │ ├── bin │ │ └── php-parse │ │ ├── composer.json │ │ ├── doc │ │ ├── 0_Introduction.markdown │ │ ├── 2_Usage_of_basic_components.markdown │ │ ├── 3_Other_node_tree_representations.markdown │ │ ├── 4_Code_generation.markdown │ │ └── component │ │ │ ├── Error_handling.markdown │ │ │ └── Lexer.markdown │ │ ├── grammar │ │ ├── README.md │ │ ├── parser.template │ │ ├── php5.y │ │ ├── php7.y │ │ ├── rebuildParsers.php │ │ ├── tokens.template │ │ └── tokens.y │ │ ├── lib │ │ ├── PhpParser │ │ │ ├── Autoloader.php │ │ │ ├── Builder.php │ │ │ ├── Builder │ │ │ │ ├── Class_.php │ │ │ │ ├── Declaration.php │ │ │ │ ├── FunctionLike.php │ │ │ │ ├── Function_.php │ │ │ │ ├── Interface_.php │ │ │ │ ├── Method.php │ │ │ │ ├── Namespace_.php │ │ │ │ ├── Param.php │ │ │ │ ├── Property.php │ │ │ │ ├── Trait_.php │ │ │ │ └── Use_.php │ │ │ ├── BuilderAbstract.php │ │ │ ├── BuilderFactory.php │ │ │ ├── Comment.php │ │ │ ├── Comment │ │ │ │ └── Doc.php │ │ │ ├── Error.php │ │ │ ├── ErrorHandler.php │ │ │ ├── ErrorHandler │ │ │ │ ├── Collecting.php │ │ │ │ └── Throwing.php │ │ │ ├── Lexer.php │ │ │ ├── Lexer │ │ │ │ └── Emulative.php │ │ │ ├── Node.php │ │ │ ├── Node │ │ │ │ ├── Arg.php │ │ │ │ ├── Const_.php │ │ │ │ ├── Expr.php │ │ │ │ ├── Expr │ │ │ │ │ ├── ArrayDimFetch.php │ │ │ │ │ ├── ArrayItem.php │ │ │ │ │ ├── Array_.php │ │ │ │ │ ├── Assign.php │ │ │ │ │ ├── AssignOp.php │ │ │ │ │ ├── AssignOp │ │ │ │ │ │ ├── BitwiseAnd.php │ │ │ │ │ │ ├── BitwiseOr.php │ │ │ │ │ │ ├── BitwiseXor.php │ │ │ │ │ │ ├── Concat.php │ │ │ │ │ │ ├── Div.php │ │ │ │ │ │ ├── Minus.php │ │ │ │ │ │ ├── Mod.php │ │ │ │ │ │ ├── Mul.php │ │ │ │ │ │ ├── Plus.php │ │ │ │ │ │ ├── Pow.php │ │ │ │ │ │ ├── ShiftLeft.php │ │ │ │ │ │ └── ShiftRight.php │ │ │ │ │ ├── AssignRef.php │ │ │ │ │ ├── BinaryOp.php │ │ │ │ │ ├── BinaryOp │ │ │ │ │ │ ├── BitwiseAnd.php │ │ │ │ │ │ ├── BitwiseOr.php │ │ │ │ │ │ ├── BitwiseXor.php │ │ │ │ │ │ ├── BooleanAnd.php │ │ │ │ │ │ ├── BooleanOr.php │ │ │ │ │ │ ├── Coalesce.php │ │ │ │ │ │ ├── Concat.php │ │ │ │ │ │ ├── Div.php │ │ │ │ │ │ ├── Equal.php │ │ │ │ │ │ ├── Greater.php │ │ │ │ │ │ ├── GreaterOrEqual.php │ │ │ │ │ │ ├── Identical.php │ │ │ │ │ │ ├── LogicalAnd.php │ │ │ │ │ │ ├── LogicalOr.php │ │ │ │ │ │ ├── LogicalXor.php │ │ │ │ │ │ ├── Minus.php │ │ │ │ │ │ ├── Mod.php │ │ │ │ │ │ ├── Mul.php │ │ │ │ │ │ ├── NotEqual.php │ │ │ │ │ │ ├── NotIdentical.php │ │ │ │ │ │ ├── Plus.php │ │ │ │ │ │ ├── Pow.php │ │ │ │ │ │ ├── ShiftLeft.php │ │ │ │ │ │ ├── ShiftRight.php │ │ │ │ │ │ ├── Smaller.php │ │ │ │ │ │ ├── SmallerOrEqual.php │ │ │ │ │ │ └── Spaceship.php │ │ │ │ │ ├── BitwiseNot.php │ │ │ │ │ ├── BooleanNot.php │ │ │ │ │ ├── Cast.php │ │ │ │ │ ├── Cast │ │ │ │ │ │ ├── Array_.php │ │ │ │ │ │ ├── Bool_.php │ │ │ │ │ │ ├── Double.php │ │ │ │ │ │ ├── Int_.php │ │ │ │ │ │ ├── Object_.php │ │ │ │ │ │ ├── String_.php │ │ │ │ │ │ └── Unset_.php │ │ │ │ │ ├── ClassConstFetch.php │ │ │ │ │ ├── Clone_.php │ │ │ │ │ ├── Closure.php │ │ │ │ │ ├── ClosureUse.php │ │ │ │ │ ├── ConstFetch.php │ │ │ │ │ ├── Empty_.php │ │ │ │ │ ├── Error.php │ │ │ │ │ ├── ErrorSuppress.php │ │ │ │ │ ├── Eval_.php │ │ │ │ │ ├── Exit_.php │ │ │ │ │ ├── FuncCall.php │ │ │ │ │ ├── Include_.php │ │ │ │ │ ├── Instanceof_.php │ │ │ │ │ ├── Isset_.php │ │ │ │ │ ├── List_.php │ │ │ │ │ ├── MethodCall.php │ │ │ │ │ ├── New_.php │ │ │ │ │ ├── PostDec.php │ │ │ │ │ ├── PostInc.php │ │ │ │ │ ├── PreDec.php │ │ │ │ │ ├── PreInc.php │ │ │ │ │ ├── Print_.php │ │ │ │ │ ├── PropertyFetch.php │ │ │ │ │ ├── ShellExec.php │ │ │ │ │ ├── StaticCall.php │ │ │ │ │ ├── StaticPropertyFetch.php │ │ │ │ │ ├── Ternary.php │ │ │ │ │ ├── UnaryMinus.php │ │ │ │ │ ├── UnaryPlus.php │ │ │ │ │ ├── Variable.php │ │ │ │ │ ├── YieldFrom.php │ │ │ │ │ └── Yield_.php │ │ │ │ ├── FunctionLike.php │ │ │ │ ├── Name.php │ │ │ │ ├── Name │ │ │ │ │ ├── FullyQualified.php │ │ │ │ │ └── Relative.php │ │ │ │ ├── NullableType.php │ │ │ │ ├── Param.php │ │ │ │ ├── Scalar.php │ │ │ │ ├── Scalar │ │ │ │ │ ├── DNumber.php │ │ │ │ │ ├── Encapsed.php │ │ │ │ │ ├── EncapsedStringPart.php │ │ │ │ │ ├── LNumber.php │ │ │ │ │ ├── MagicConst.php │ │ │ │ │ ├── MagicConst │ │ │ │ │ │ ├── Class_.php │ │ │ │ │ │ ├── Dir.php │ │ │ │ │ │ ├── File.php │ │ │ │ │ │ ├── Function_.php │ │ │ │ │ │ ├── Line.php │ │ │ │ │ │ ├── Method.php │ │ │ │ │ │ ├── Namespace_.php │ │ │ │ │ │ └── Trait_.php │ │ │ │ │ └── String_.php │ │ │ │ ├── Stmt.php │ │ │ │ └── Stmt │ │ │ │ │ ├── Break_.php │ │ │ │ │ ├── Case_.php │ │ │ │ │ ├── Catch_.php │ │ │ │ │ ├── ClassConst.php │ │ │ │ │ ├── ClassLike.php │ │ │ │ │ ├── ClassMethod.php │ │ │ │ │ ├── Class_.php │ │ │ │ │ ├── Const_.php │ │ │ │ │ ├── Continue_.php │ │ │ │ │ ├── DeclareDeclare.php │ │ │ │ │ ├── Declare_.php │ │ │ │ │ ├── Do_.php │ │ │ │ │ ├── Echo_.php │ │ │ │ │ ├── ElseIf_.php │ │ │ │ │ ├── Else_.php │ │ │ │ │ ├── Finally_.php │ │ │ │ │ ├── For_.php │ │ │ │ │ ├── Foreach_.php │ │ │ │ │ ├── Function_.php │ │ │ │ │ ├── Global_.php │ │ │ │ │ ├── Goto_.php │ │ │ │ │ ├── GroupUse.php │ │ │ │ │ ├── HaltCompiler.php │ │ │ │ │ ├── If_.php │ │ │ │ │ ├── InlineHTML.php │ │ │ │ │ ├── Interface_.php │ │ │ │ │ ├── Label.php │ │ │ │ │ ├── Namespace_.php │ │ │ │ │ ├── Nop.php │ │ │ │ │ ├── Property.php │ │ │ │ │ ├── PropertyProperty.php │ │ │ │ │ ├── Return_.php │ │ │ │ │ ├── StaticVar.php │ │ │ │ │ ├── Static_.php │ │ │ │ │ ├── Switch_.php │ │ │ │ │ ├── Throw_.php │ │ │ │ │ ├── TraitUse.php │ │ │ │ │ ├── TraitUseAdaptation.php │ │ │ │ │ ├── TraitUseAdaptation │ │ │ │ │ ├── Alias.php │ │ │ │ │ └── Precedence.php │ │ │ │ │ ├── Trait_.php │ │ │ │ │ ├── TryCatch.php │ │ │ │ │ ├── Unset_.php │ │ │ │ │ ├── UseUse.php │ │ │ │ │ ├── Use_.php │ │ │ │ │ └── While_.php │ │ │ ├── NodeAbstract.php │ │ │ ├── NodeDumper.php │ │ │ ├── NodeTraverser.php │ │ │ ├── NodeTraverserInterface.php │ │ │ ├── NodeVisitor.php │ │ │ ├── NodeVisitor │ │ │ │ └── NameResolver.php │ │ │ ├── NodeVisitorAbstract.php │ │ │ ├── Parser.php │ │ │ ├── Parser │ │ │ │ ├── Multiple.php │ │ │ │ ├── Php5.php │ │ │ │ ├── Php7.php │ │ │ │ └── Tokens.php │ │ │ ├── ParserAbstract.php │ │ │ ├── ParserFactory.php │ │ │ ├── PrettyPrinter │ │ │ │ └── Standard.php │ │ │ ├── PrettyPrinterAbstract.php │ │ │ ├── Serializer.php │ │ │ ├── Serializer │ │ │ │ └── XML.php │ │ │ ├── Unserializer.php │ │ │ └── Unserializer │ │ │ │ └── XML.php │ │ └── bootstrap.php │ │ ├── phpunit.xml.dist │ │ ├── test │ │ ├── PhpParser │ │ │ ├── AutoloaderTest.php │ │ │ ├── Builder │ │ │ │ ├── ClassTest.php │ │ │ │ ├── FunctionTest.php │ │ │ │ ├── InterfaceTest.php │ │ │ │ ├── MethodTest.php │ │ │ │ ├── NamespaceTest.php │ │ │ │ ├── ParamTest.php │ │ │ │ ├── PropertyTest.php │ │ │ │ ├── TraitTest.php │ │ │ │ └── UseTest.php │ │ │ ├── BuilderFactoryTest.php │ │ │ ├── CodeParsingTest.php │ │ │ ├── CodeTestAbstract.php │ │ │ ├── CommentTest.php │ │ │ ├── ErrorHandler │ │ │ │ ├── CollectingTest.php │ │ │ │ └── ThrowingTest.php │ │ │ ├── ErrorTest.php │ │ │ ├── Lexer │ │ │ │ └── EmulativeTest.php │ │ │ ├── LexerTest.php │ │ │ ├── Node │ │ │ │ ├── NameTest.php │ │ │ │ ├── Scalar │ │ │ │ │ ├── MagicConstTest.php │ │ │ │ │ └── StringTest.php │ │ │ │ └── Stmt │ │ │ │ │ ├── ClassConstTest.php │ │ │ │ │ ├── ClassMethodTest.php │ │ │ │ │ ├── ClassTest.php │ │ │ │ │ ├── InterfaceTest.php │ │ │ │ │ └── PropertyTest.php │ │ │ ├── NodeAbstractTest.php │ │ │ ├── NodeDumperTest.php │ │ │ ├── NodeTraverserTest.php │ │ │ ├── NodeVisitor │ │ │ │ └── NameResolverTest.php │ │ │ ├── Parser │ │ │ │ ├── MultipleTest.php │ │ │ │ ├── Php5Test.php │ │ │ │ └── Php7Test.php │ │ │ ├── ParserFactoryTest.php │ │ │ ├── ParserTest.php │ │ │ ├── PrettyPrinterTest.php │ │ │ ├── Serializer │ │ │ │ └── XMLTest.php │ │ │ └── Unserializer │ │ │ │ └── XMLTest.php │ │ ├── bootstrap.php │ │ └── code │ │ │ ├── parser │ │ │ ├── blockComments.test │ │ │ ├── comments.test │ │ │ ├── errorHandling │ │ │ │ ├── eofError.test │ │ │ │ ├── lexerErrors.test │ │ │ │ └── recovery.test │ │ │ ├── expr │ │ │ │ ├── arrayDef.test │ │ │ │ ├── arrayDestructuring.test │ │ │ │ ├── assign.test │ │ │ │ ├── assignNewByRef.test │ │ │ │ ├── cast.test │ │ │ │ ├── clone.test │ │ │ │ ├── closure.test │ │ │ │ ├── comparison.test │ │ │ │ ├── constant_expr.test │ │ │ │ ├── errorSuppress.test │ │ │ │ ├── exit.test │ │ │ │ ├── fetchAndCall │ │ │ │ │ ├── args.test │ │ │ │ │ ├── constFetch.test │ │ │ │ │ ├── constantDeref.test │ │ │ │ │ ├── funcCall.test │ │ │ │ │ ├── newDeref.test │ │ │ │ │ ├── objectAccess.test │ │ │ │ │ ├── simpleArrayAccess.test │ │ │ │ │ ├── staticCall.test │ │ │ │ │ └── staticPropertyFetch.test │ │ │ │ ├── includeAndEval.test │ │ │ │ ├── issetAndEmpty.test │ │ │ │ ├── listWithKeys.test │ │ │ │ ├── logic.test │ │ │ │ ├── math.test │ │ │ │ ├── new.test │ │ │ │ ├── newWithoutClass.test │ │ │ │ ├── print.test │ │ │ │ ├── shellExec.test │ │ │ │ ├── ternaryAndCoalesce.test │ │ │ │ ├── uvs │ │ │ │ │ ├── globalNonSimpleVarError.test │ │ │ │ │ ├── indirectCall.test │ │ │ │ │ ├── isset.test │ │ │ │ │ ├── misc.test │ │ │ │ │ ├── new.test │ │ │ │ │ └── staticProperty.test │ │ │ │ └── variable.test │ │ │ ├── scalar │ │ │ │ ├── constantString.test │ │ │ │ ├── docString.test │ │ │ │ ├── docStringNewlines.test │ │ │ │ ├── encapsedNegVarOffset.test │ │ │ │ ├── encapsedString.test │ │ │ │ ├── float.test │ │ │ │ ├── int.test │ │ │ │ ├── invalidOctal.test │ │ │ │ ├── magicConst.test │ │ │ │ └── unicodeEscape.test │ │ │ ├── semiReserved.test │ │ │ └── stmt │ │ │ │ ├── blocklessStatement.test │ │ │ │ ├── class │ │ │ │ ├── abstract.test │ │ │ │ ├── anonymous.test │ │ │ │ ├── conditional.test │ │ │ │ ├── constModifierErrors.test │ │ │ │ ├── constModifiers.test │ │ │ │ ├── final.test │ │ │ │ ├── implicitPublic.test │ │ │ │ ├── interface.test │ │ │ │ ├── modifier.test │ │ │ │ ├── name.test │ │ │ │ ├── php4Style.test │ │ │ │ ├── simple.test │ │ │ │ ├── staticMethod.test │ │ │ │ └── trait.test │ │ │ │ ├── const.test │ │ │ │ ├── controlFlow.test │ │ │ │ ├── declare.test │ │ │ │ ├── echo.test │ │ │ │ ├── function │ │ │ │ ├── builtinTypeDeclarations.test │ │ │ │ ├── byRef.test │ │ │ │ ├── conditional.test │ │ │ │ ├── defaultValues.test │ │ │ │ ├── nullableTypes.test │ │ │ │ ├── returnTypes.test │ │ │ │ ├── specialVars.test │ │ │ │ ├── typeDeclarations.test │ │ │ │ ├── variadic.test │ │ │ │ └── variadicDefaultValue.test │ │ │ │ ├── generator │ │ │ │ ├── basic.test │ │ │ │ ├── yieldPrecedence.test │ │ │ │ └── yieldUnaryPrecedence.test │ │ │ │ ├── haltCompiler.test │ │ │ │ ├── haltCompilerInvalidSyntax.test │ │ │ │ ├── haltCompilerOffset.test │ │ │ │ ├── haltCompilerOutermostScope.test │ │ │ │ ├── hashbang.test │ │ │ │ ├── if.test │ │ │ │ ├── inlineHTML.test │ │ │ │ ├── loop │ │ │ │ ├── do.test │ │ │ │ ├── for.test │ │ │ │ ├── foreach.test │ │ │ │ └── while.test │ │ │ │ ├── multiCatch.test │ │ │ │ ├── namespace │ │ │ │ ├── alias.test │ │ │ │ ├── braced.test │ │ │ │ ├── groupUse.test │ │ │ │ ├── groupUseErrors.test │ │ │ │ ├── groupUsePositions.test │ │ │ │ ├── invalidName.test │ │ │ │ ├── mix.test │ │ │ │ ├── name.test │ │ │ │ ├── nested.test │ │ │ │ ├── notBraced.test │ │ │ │ ├── nsAfterHashbang.test │ │ │ │ ├── outsideStmt.test │ │ │ │ └── outsideStmtInvalid.test │ │ │ │ ├── switch.test │ │ │ │ ├── tryCatch.test │ │ │ │ ├── tryWithoutCatch.test │ │ │ │ └── unset.test │ │ │ └── prettyPrinter │ │ │ ├── comments.test │ │ │ ├── commentsInCommaList.test │ │ │ ├── expr │ │ │ ├── anonymousClass.test │ │ │ ├── arrayDestructuring.test │ │ │ ├── call.test │ │ │ ├── closure.test │ │ │ ├── constant_deref.test │ │ │ ├── docStrings.test │ │ │ ├── include.test │ │ │ ├── intrinsics.test │ │ │ ├── list.test │ │ │ ├── literals.test │ │ │ ├── numbers.test │ │ │ ├── operators.test │ │ │ ├── parentheses.test │ │ │ ├── shortArraySyntax.test │ │ │ ├── stringEscaping.test │ │ │ ├── uvs.test │ │ │ ├── variables.test │ │ │ └── yield.test │ │ │ ├── inlineHTMLandPHPtest.file-test │ │ │ ├── onlyInlineHTML.file-test │ │ │ ├── onlyPHP.file-test │ │ │ └── stmt │ │ │ ├── alias.test │ │ │ ├── break_continue.test │ │ │ ├── class.test │ │ │ ├── class_const.test │ │ │ ├── const.test │ │ │ ├── declare.test │ │ │ ├── do_while.test │ │ │ ├── for.test │ │ │ ├── foreach.test │ │ │ ├── function_signatures.test │ │ │ ├── global_static_variables.test │ │ │ ├── goto.test │ │ │ ├── groupUse.test │ │ │ ├── haltCompiler.file-test │ │ │ ├── if.test │ │ │ ├── multiCatch.test │ │ │ ├── namespaces.test │ │ │ ├── nullable_types.test │ │ │ ├── switch.test │ │ │ ├── throw.test │ │ │ ├── traitUse.test │ │ │ ├── tryCatch.test │ │ │ └── while.test │ │ └── test_old │ │ ├── run-php-src.sh │ │ └── run.php ├── 02. 頁面快取 │ ├── index.cache │ └── index.php ├── 03. predis-demo │ ├── Dockerfile │ ├── composer.json │ ├── composer.lock │ ├── index.php │ └── vendor │ │ ├── autoload.php │ │ ├── composer │ │ ├── ClassLoader.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ └── installed.json │ │ └── predis │ │ └── predis │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── FAQ.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── VERSION │ │ ├── autoload.php │ │ ├── bin │ │ ├── create-command-test │ │ ├── create-pear │ │ ├── create-phar │ │ └── create-single-file │ │ ├── composer.json │ │ ├── examples │ │ ├── custom_cluster_distributor.php │ │ ├── debuggable_connection.php │ │ ├── dispatcher_loop.php │ │ ├── executing_redis_commands.php │ │ ├── key_prefixing.php │ │ ├── lua_scripting_abstraction.php │ │ ├── monitor_consumer.php │ │ ├── pipelining_commands.php │ │ ├── pubsub_consumer.php │ │ ├── redis_collections_iterators.php │ │ ├── replication_complex.php │ │ ├── replication_sentinel.php │ │ ├── replication_simple.php │ │ ├── session_handler.php │ │ ├── shared.php │ │ └── transaction_using_cas.php │ │ ├── package.ini │ │ └── src │ │ ├── Autoloader.php │ │ ├── Client.php │ │ ├── ClientContextInterface.php │ │ ├── ClientException.php │ │ ├── ClientInterface.php │ │ ├── Cluster │ │ ├── ClusterStrategy.php │ │ ├── Distributor │ │ │ ├── DistributorInterface.php │ │ │ ├── EmptyRingException.php │ │ │ ├── HashRing.php │ │ │ └── KetamaRing.php │ │ ├── Hash │ │ │ ├── CRC16.php │ │ │ └── HashGeneratorInterface.php │ │ ├── PredisStrategy.php │ │ ├── RedisStrategy.php │ │ └── StrategyInterface.php │ │ ├── Collection │ │ └── Iterator │ │ │ ├── CursorBasedIterator.php │ │ │ ├── HashKey.php │ │ │ ├── Keyspace.php │ │ │ ├── ListKey.php │ │ │ ├── SetKey.php │ │ │ └── SortedSetKey.php │ │ ├── Command │ │ ├── Command.php │ │ ├── CommandInterface.php │ │ ├── ConnectionAuth.php │ │ ├── ConnectionEcho.php │ │ ├── ConnectionPing.php │ │ ├── ConnectionQuit.php │ │ ├── ConnectionSelect.php │ │ ├── GeospatialGeoAdd.php │ │ ├── GeospatialGeoDist.php │ │ ├── GeospatialGeoHash.php │ │ ├── GeospatialGeoPos.php │ │ ├── GeospatialGeoRadius.php │ │ ├── GeospatialGeoRadiusByMember.php │ │ ├── HashDelete.php │ │ ├── HashExists.php │ │ ├── HashGet.php │ │ ├── HashGetAll.php │ │ ├── HashGetMultiple.php │ │ ├── HashIncrementBy.php │ │ ├── HashIncrementByFloat.php │ │ ├── HashKeys.php │ │ ├── HashLength.php │ │ ├── HashScan.php │ │ ├── HashSet.php │ │ ├── HashSetMultiple.php │ │ ├── HashSetPreserve.php │ │ ├── HashStringLength.php │ │ ├── HashValues.php │ │ ├── HyperLogLogAdd.php │ │ ├── HyperLogLogCount.php │ │ ├── HyperLogLogMerge.php │ │ ├── KeyDelete.php │ │ ├── KeyDump.php │ │ ├── KeyExists.php │ │ ├── KeyExpire.php │ │ ├── KeyExpireAt.php │ │ ├── KeyKeys.php │ │ ├── KeyMigrate.php │ │ ├── KeyMove.php │ │ ├── KeyPersist.php │ │ ├── KeyPreciseExpire.php │ │ ├── KeyPreciseExpireAt.php │ │ ├── KeyPreciseTimeToLive.php │ │ ├── KeyRandom.php │ │ ├── KeyRename.php │ │ ├── KeyRenamePreserve.php │ │ ├── KeyRestore.php │ │ ├── KeyScan.php │ │ ├── KeySort.php │ │ ├── KeyTimeToLive.php │ │ ├── KeyType.php │ │ ├── ListIndex.php │ │ ├── ListInsert.php │ │ ├── ListLength.php │ │ ├── ListPopFirst.php │ │ ├── ListPopFirstBlocking.php │ │ ├── ListPopLast.php │ │ ├── ListPopLastBlocking.php │ │ ├── ListPopLastPushHead.php │ │ ├── ListPopLastPushHeadBlocking.php │ │ ├── ListPushHead.php │ │ ├── ListPushHeadX.php │ │ ├── ListPushTail.php │ │ ├── ListPushTailX.php │ │ ├── ListRange.php │ │ ├── ListRemove.php │ │ ├── ListSet.php │ │ ├── ListTrim.php │ │ ├── PrefixableCommandInterface.php │ │ ├── Processor │ │ │ ├── KeyPrefixProcessor.php │ │ │ ├── ProcessorChain.php │ │ │ └── ProcessorInterface.php │ │ ├── PubSubPublish.php │ │ ├── PubSubPubsub.php │ │ ├── PubSubSubscribe.php │ │ ├── PubSubSubscribeByPattern.php │ │ ├── PubSubUnsubscribe.php │ │ ├── PubSubUnsubscribeByPattern.php │ │ ├── RawCommand.php │ │ ├── ScriptCommand.php │ │ ├── ServerBackgroundRewriteAOF.php │ │ ├── ServerBackgroundSave.php │ │ ├── ServerClient.php │ │ ├── ServerCommand.php │ │ ├── ServerConfig.php │ │ ├── ServerDatabaseSize.php │ │ ├── ServerEval.php │ │ ├── ServerEvalSHA.php │ │ ├── ServerFlushAll.php │ │ ├── ServerFlushDatabase.php │ │ ├── ServerInfo.php │ │ ├── ServerInfoV26x.php │ │ ├── ServerLastSave.php │ │ ├── ServerMonitor.php │ │ ├── ServerObject.php │ │ ├── ServerSave.php │ │ ├── ServerScript.php │ │ ├── ServerSentinel.php │ │ ├── ServerShutdown.php │ │ ├── ServerSlaveOf.php │ │ ├── ServerSlowlog.php │ │ ├── ServerTime.php │ │ ├── SetAdd.php │ │ ├── SetCardinality.php │ │ ├── SetDifference.php │ │ ├── SetDifferenceStore.php │ │ ├── SetIntersection.php │ │ ├── SetIntersectionStore.php │ │ ├── SetIsMember.php │ │ ├── SetMembers.php │ │ ├── SetMove.php │ │ ├── SetPop.php │ │ ├── SetRandomMember.php │ │ ├── SetRemove.php │ │ ├── SetScan.php │ │ ├── SetUnion.php │ │ ├── SetUnionStore.php │ │ ├── StringAppend.php │ │ ├── StringBitCount.php │ │ ├── StringBitField.php │ │ ├── StringBitOp.php │ │ ├── StringBitPos.php │ │ ├── StringDecrement.php │ │ ├── StringDecrementBy.php │ │ ├── StringGet.php │ │ ├── StringGetBit.php │ │ ├── StringGetMultiple.php │ │ ├── StringGetRange.php │ │ ├── StringGetSet.php │ │ ├── StringIncrement.php │ │ ├── StringIncrementBy.php │ │ ├── StringIncrementByFloat.php │ │ ├── StringPreciseSetExpire.php │ │ ├── StringSet.php │ │ ├── StringSetBit.php │ │ ├── StringSetExpire.php │ │ ├── StringSetMultiple.php │ │ ├── StringSetMultiplePreserve.php │ │ ├── StringSetPreserve.php │ │ ├── StringSetRange.php │ │ ├── StringStrlen.php │ │ ├── StringSubstr.php │ │ ├── TransactionDiscard.php │ │ ├── TransactionExec.php │ │ ├── TransactionMulti.php │ │ ├── TransactionUnwatch.php │ │ ├── TransactionWatch.php │ │ ├── ZSetAdd.php │ │ ├── ZSetCardinality.php │ │ ├── ZSetCount.php │ │ ├── ZSetIncrementBy.php │ │ ├── ZSetIntersectionStore.php │ │ ├── ZSetLexCount.php │ │ ├── ZSetRange.php │ │ ├── ZSetRangeByLex.php │ │ ├── ZSetRangeByScore.php │ │ ├── ZSetRank.php │ │ ├── ZSetRemove.php │ │ ├── ZSetRemoveRangeByLex.php │ │ ├── ZSetRemoveRangeByRank.php │ │ ├── ZSetRemoveRangeByScore.php │ │ ├── ZSetReverseRange.php │ │ ├── ZSetReverseRangeByLex.php │ │ ├── ZSetReverseRangeByScore.php │ │ ├── ZSetReverseRank.php │ │ ├── ZSetScan.php │ │ ├── ZSetScore.php │ │ └── ZSetUnionStore.php │ │ ├── CommunicationException.php │ │ ├── Configuration │ │ ├── ClusterOption.php │ │ ├── ConnectionFactoryOption.php │ │ ├── ExceptionsOption.php │ │ ├── OptionInterface.php │ │ ├── Options.php │ │ ├── OptionsInterface.php │ │ ├── PrefixOption.php │ │ ├── ProfileOption.php │ │ └── ReplicationOption.php │ │ ├── Connection │ │ ├── AbstractConnection.php │ │ ├── Aggregate │ │ │ ├── ClusterInterface.php │ │ │ ├── MasterSlaveReplication.php │ │ │ ├── PredisCluster.php │ │ │ ├── RedisCluster.php │ │ │ ├── ReplicationInterface.php │ │ │ └── SentinelReplication.php │ │ ├── AggregateConnectionInterface.php │ │ ├── CompositeConnectionInterface.php │ │ ├── CompositeStreamConnection.php │ │ ├── ConnectionException.php │ │ ├── ConnectionInterface.php │ │ ├── Factory.php │ │ ├── FactoryInterface.php │ │ ├── NodeConnectionInterface.php │ │ ├── Parameters.php │ │ ├── ParametersInterface.php │ │ ├── PhpiredisSocketConnection.php │ │ ├── PhpiredisStreamConnection.php │ │ ├── StreamConnection.php │ │ └── WebdisConnection.php │ │ ├── Monitor │ │ └── Consumer.php │ │ ├── NotSupportedException.php │ │ ├── Pipeline │ │ ├── Atomic.php │ │ ├── ConnectionErrorProof.php │ │ ├── FireAndForget.php │ │ └── Pipeline.php │ │ ├── PredisException.php │ │ ├── Profile │ │ ├── Factory.php │ │ ├── ProfileInterface.php │ │ ├── RedisProfile.php │ │ ├── RedisUnstable.php │ │ ├── RedisVersion200.php │ │ ├── RedisVersion220.php │ │ ├── RedisVersion240.php │ │ ├── RedisVersion260.php │ │ ├── RedisVersion280.php │ │ ├── RedisVersion300.php │ │ └── RedisVersion320.php │ │ ├── Protocol │ │ ├── ProtocolException.php │ │ ├── ProtocolProcessorInterface.php │ │ ├── RequestSerializerInterface.php │ │ ├── ResponseReaderInterface.php │ │ └── Text │ │ │ ├── CompositeProtocolProcessor.php │ │ │ ├── Handler │ │ │ ├── BulkResponse.php │ │ │ ├── ErrorResponse.php │ │ │ ├── IntegerResponse.php │ │ │ ├── MultiBulkResponse.php │ │ │ ├── ResponseHandlerInterface.php │ │ │ ├── StatusResponse.php │ │ │ └── StreamableMultiBulkResponse.php │ │ │ ├── ProtocolProcessor.php │ │ │ ├── RequestSerializer.php │ │ │ └── ResponseReader.php │ │ ├── PubSub │ │ ├── AbstractConsumer.php │ │ ├── Consumer.php │ │ └── DispatcherLoop.php │ │ ├── Replication │ │ ├── MissingMasterException.php │ │ ├── ReplicationStrategy.php │ │ └── RoleException.php │ │ ├── Response │ │ ├── Error.php │ │ ├── ErrorInterface.php │ │ ├── Iterator │ │ │ ├── MultiBulk.php │ │ │ ├── MultiBulkIterator.php │ │ │ └── MultiBulkTuple.php │ │ ├── ResponseInterface.php │ │ ├── ServerException.php │ │ └── Status.php │ │ ├── Session │ │ └── Handler.php │ │ └── Transaction │ │ ├── AbortedMultiExecException.php │ │ ├── MultiExec.php │ │ └── MultiExecState.php └── 04. LRUCache │ ├── LRUCache.java │ └── Main.java ├── 40. HTTP Representation └── Content-Encoding Demo │ ├── java │ ├── GzipBodyFactory.java │ ├── Main.java │ ├── ReqResResponseHandler.java │ ├── ReqResService.java │ ├── ResponseHandler.java │ ├── Result.java │ └── RetrofitFactory.java │ ├── js │ ├── Content-Encoding-Demo.html │ └── pako_deflate.min.js │ └── sh │ └── Request.sh ├── 44. GET vs POST ├── UrlEncoderDemo.java └── encodeFormData.js ├── 47. C Socket HTTP Client └── main.c ├── 52. HTTP Message Tracing └── GetIpAddress.php ├── 58. Overload ├── Chef.java └── RectangleGUI.java ├── 60. syntax-highlighting ├── README.txt ├── index.html ├── license.txt └── style │ └── prism.css └── README.md /02. Factory-Method-Pattern/Breakfast.java: -------------------------------------------------------------------------------- 1 | interface Breakfast { 2 | 3 | // 被吃 4 | void eaten(); 5 | } 6 | -------------------------------------------------------------------------------- /02. Factory-Method-Pattern/BreakfastJoint.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 為工廠方法模式中的 工廠 (參數化工廠) 3 | * 定義一個做早餐的 int 參數 工廠方法,交給子類別實作 4 | * 且提供一個預設的 Class 參數 工廠方法 5 | */ 6 | public abstract class BreakfastJoint { 7 | 8 | // 做早餐 並回傳 9 | // param: int 10 | public abstract Breakfast makeBreakfast(int type); 11 | 12 | 13 | // 做早餐 並回傳 14 | // param: Class 15 | public T makeBreakfast(Class c) { 16 | 17 | Breakfast breakfast = null; 18 | try { 19 | // 透過 Java 反射 (Reflection) 機制,用類別名稱實例物件 20 | breakfast = (Breakfast) Class.forName(c.getName()).newInstance(); 21 | } catch (Exception e) { 22 | // 例外處理 23 | } 24 | return (T) breakfast; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /02. Factory-Method-Pattern/CaLaChickenBurger.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 具體實作 『早餐』的產品 3 | */ 4 | class CaLaChickenBurger implements Breakfast { 5 | @Override 6 | public void eaten() { 7 | System.out.println("咔拉雞腿滿福堡 好棒棒"); 8 | } 9 | } -------------------------------------------------------------------------------- /02. Factory-Method-Pattern/GarlicChiliSpaghetti.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public class GarlicChiliSpaghetti implements Breakfast { 5 | @Override 6 | public void eaten() { 7 | System.out.println("大蒜辣椒麵 :D"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /02. Factory-Method-Pattern/MilkTea.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public class MilkTea implements Breakfast { 5 | @Override 6 | public void eaten() { 7 | System.out.println("烙賽 大冰奶"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /02. Factory-Method-Pattern/People.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 人 3 | * 負責吃早餐 4 | */ 5 | class People { 6 | 7 | private Breakfast breakfast; 8 | 9 | public People(Breakfast breakfast) { 10 | this.breakfast = breakfast; 11 | } 12 | 13 | public People() { 14 | 15 | } 16 | 17 | public void setBreakfast(Breakfast breakfast) { 18 | this.breakfast = breakfast; 19 | } 20 | 21 | // 吃早餐 22 | public void eatBreakfast() { 23 | 24 | if (breakfast != null) { 25 | breakfast.eaten(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /03. IoC-DI/Game.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/11/22. 3 | */ 4 | interface Game { 5 | 6 | void play(); 7 | } 8 | -------------------------------------------------------------------------------- /03. IoC-DI/GameInjector.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/11/22. 3 | */ // 遊戲注入者 4 | // 可以規範: 任何需要 "遊戲" 的模組 都必須實做此介面 5 | interface GameInjector { 6 | void injectGame(Game game); 7 | } 8 | -------------------------------------------------------------------------------- /03. IoC-DI/爆爆王.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/11/22. 3 | */ 4 | class 爆爆王 implements Game { 5 | 6 | @Override 7 | public void play() { 8 | System.out.print("海盜船 14"); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /03. IoC-DI/英雄聯盟.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/11/22. 3 | */ 4 | class 英雄聯盟 implements Game { 5 | 6 | @Override 7 | public void play() { 8 | System.out.print("德瑪西雅~"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /04. Command-Pattern/Main.java: -------------------------------------------------------------------------------- 1 | import restaurant.餐廳; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | 7 | // 原始碼範例 8 | // Runnable runnable = () -> System.out.println("具體命令"); // Command cmd = ConcreteCommand 9 | // Thread thread1 = new Thread(runnable); // 將 cmd 交給 Thread (Invoker) 10 | // thread1.start(); // Invoker 調用 cmd 的 執行方法 11 | 12 | // 餐廳範例 13 | 餐廳 restaurant = new 餐廳("Good Good Eat Restaurant"); // 創建餐廳 14 | Thread thread2 = new Thread(restaurant, restaurant.getName()); 15 | thread2.start(); // 餐廳開始營業 16 | 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /04. Command-Pattern/logger/Logger.java: -------------------------------------------------------------------------------- 1 | package logger; 2 | 3 | /** 4 | * Created by zhengzhongsheng on 2016/12/5. 5 | */ 6 | public interface Logger { 7 | 8 | void writeFile(String pathName, Object object); 9 | 10 | Object readFile(String pathName); 11 | } 12 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/customer/input/CheckHandler.java: -------------------------------------------------------------------------------- 1 | package restaurant.customer.input; 2 | 3 | 4 | import restaurant.服務生; 5 | import restaurant.餐廳; 6 | 7 | /** 8 | * Created by zhengzhongsheng on 2016/12/5. 9 | */ 10 | public class CheckHandler implements Handler { 11 | 12 | @Override 13 | public void handle(餐廳 restaurant) { 14 | 服務生 waiter = restaurant.getWaiter(); 15 | waiter.checkOrders(); 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/customer/input/ExitHandler.java: -------------------------------------------------------------------------------- 1 | package restaurant.customer.input; 2 | 3 | import restaurant.服務生; 4 | import restaurant.餐廳; 5 | 6 | /** 7 | * Created by zhengzhongsheng on 2016/12/5. 8 | */ 9 | public class ExitHandler implements Handler { 10 | @Override 11 | public void handle(餐廳 restaurant) { 12 | 服務生 waiter = restaurant.getWaiter(); 13 | System.out.println("掰啦 下次再來唄\n"); 14 | waiter.destroyLastCustomerRecord(); // 銷毀顧客記錄 15 | restaurant.setHasCustomer(false); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/customer/input/Handler.java: -------------------------------------------------------------------------------- 1 | package restaurant.customer.input; 2 | 3 | import restaurant.餐廳; 4 | 5 | /** 6 | * Created by zhengzhongsheng on 2016/12/5. 7 | */ 8 | public interface Handler { 9 | 10 | void handle(餐廳 restaurant); 11 | } 12 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/customer/input/HandlerCreator.java: -------------------------------------------------------------------------------- 1 | package restaurant.customer.input; 2 | 3 | /** 4 | * Created by zhengzhongsheng on 2016/12/5. 5 | */ 6 | public abstract class HandlerCreator { 7 | 8 | public abstract Handler create(String input); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/customer/input/OkHandler.java: -------------------------------------------------------------------------------- 1 | package restaurant.customer.input; 2 | 3 | 4 | import restaurant.服務生; 5 | import restaurant.餐廳; 6 | 7 | /** 8 | * Created by zhengzhongsheng on 2016/12/5. 9 | */ 10 | public class OkHandler implements Handler { 11 | 12 | @Override 13 | public void handle(餐廳 restaurant) { 14 | 服務生 waiter = restaurant.getWaiter(); 15 | waiter.sendOrders(); 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/customer/input/OtherHandler.java: -------------------------------------------------------------------------------- 1 | package restaurant.customer.input; 2 | 3 | import restaurant.餐廳; 4 | 5 | /** 6 | * Created by zhengzhongsheng on 2016/12/5. 7 | */ 8 | public class OtherHandler implements Handler { 9 | @Override 10 | public void handle(餐廳 restaurant) { 11 | System.out.println("無此動作,請重新輸入\n"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/customer/input/PorkHandler.java: -------------------------------------------------------------------------------- 1 | package restaurant.customer.input; 2 | 3 | 4 | import restaurant.*; 5 | 6 | /** 7 | * Created by zhengzhongsheng on 2016/12/5. 8 | */ 9 | public class PorkHandler implements Handler { 10 | 11 | @Override 12 | public void handle(餐廳 restaurant) { 13 | 14 | 服務生 waiter = restaurant.getWaiter(); 15 | 廚師 cook = restaurant.getCook(); 16 | 17 | // 準備命令 並 設置廚師 18 | 命令 command = new 點豬排命令(cook); 19 | waiter.addOrder(command); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/customer/input/SteakHandler.java: -------------------------------------------------------------------------------- 1 | package restaurant.customer.input; 2 | 3 | 4 | import restaurant.*; 5 | 6 | /** 7 | * Created by zhengzhongsheng on 2016/12/5. 8 | */ 9 | public class SteakHandler implements Handler { 10 | 11 | @Override 12 | public void handle(餐廳 restaurant) { 13 | 服務生 waiter = restaurant.getWaiter(); 14 | 廚師 cook = restaurant.getCook(); 15 | // 準備命令 16 | 命令 command = new 點牛排命令(cook); 17 | waiter.addOrder(command); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/customer/input/UndoHandler.java: -------------------------------------------------------------------------------- 1 | package restaurant.customer.input; 2 | 3 | import restaurant.服務生; 4 | import restaurant.餐廳; 5 | 6 | /** 7 | * Created by zhengzhongsheng on 2016/12/5. 8 | */ 9 | public class UndoHandler implements Handler { 10 | 11 | @Override 12 | public void handle(餐廳 restaurant) { 13 | 服務生 waiter = restaurant.getWaiter(); 14 | waiter.undo(); // 復原上一個『執行過的』命令 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/命令.java: -------------------------------------------------------------------------------- 1 | package restaurant; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by zhengzhongsheng on 2016/12/4. 7 | */ 8 | public abstract class 命令 implements Cloneable, Serializable { 9 | 10 | protected 廚師 cook; 11 | 12 | public 命令(廚師 cook) { 13 | this.cook = cook; 14 | } 15 | 16 | public abstract void execute(); 17 | 18 | public abstract void unExecute(); 19 | 20 | @Override 21 | public Object clone() throws CloneNotSupportedException { 22 | return super.clone(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/點牛排命令.java: -------------------------------------------------------------------------------- 1 | package restaurant; 2 | 3 | /** 4 | * Created by zhengzhongsheng on 2016/12/4. 5 | */ 6 | public class 點牛排命令 extends 命令 { 7 | 8 | 9 | public 點牛排命令(廚師 cook) { 10 | super(cook); 11 | } 12 | 13 | @Override 14 | public void execute() { 15 | cook.cookSteak(); 16 | } 17 | 18 | @Override 19 | public void unExecute() { 20 | cook.cancelSteak(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /04. Command-Pattern/restaurant/點豬排命令.java: -------------------------------------------------------------------------------- 1 | package restaurant; 2 | 3 | /** 4 | * Created by zhengzhongsheng on 2016/12/4. 5 | */ 6 | public class 點豬排命令 extends 命令 { 7 | 8 | 9 | public 點豬排命令(廚師 cook) { 10 | super(cook); 11 | } 12 | 13 | @Override 14 | public void execute() { 15 | cook.cookPork(); 16 | } 17 | 18 | @Override 19 | public void unExecute() { 20 | cook.cancelPork(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /05. ADT/Main.java: -------------------------------------------------------------------------------- 1 | public class Main { 2 | 3 | public static void main(String[] args) { 4 | System.out.println("Hello World!"); 5 | } 6 | } 7 | 8 | 9 | -------------------------------------------------------------------------------- /06. Arg-Echo/ArgEcho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JS-Zheng/blog/f72fbfb83d62a17fbc976b51f11bb9172ed91596/06. Arg-Echo/ArgEcho -------------------------------------------------------------------------------- /06. Arg-Echo/ArgEcho.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]){ 4 | 5 | for (int i=0; i= 1"); 13 | } else { 14 | 15 | for (int i = 0; i < n; i++) { // 用 for 迴圈 尋訪陣列 16 | result = result + a[i]; // 將陣列值一一加總 17 | } 18 | } 19 | 20 | return result; // 回傳結果 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /09. Recursion/9.1 線性遞迴 - int 陣列總和/RecursiveFunction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public class RecursiveFunction implements IntArraySum { 5 | 6 | @Override 7 | public int sum(int[] a, int n) { 8 | if (n < 1) { // 陣列索引數不得小於 1 9 | throw new IllegalArgumentException("n should be >= 1"); 10 | } else if (n == 1) { // 陣列索引數等於 1,返回陣列的 第 "1" 個元素 11 | return a[0]; 12 | } else { 13 | return sum(a, n - 1) + a[n - 1]; // 否則,將問題拆解成 sum(a, n - 1) + a[n - 1] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /09. Recursion/9.2 尾端遞迴 - 自然數總和/PartialSumsA.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public interface PartialSumsA { 5 | 6 | /** 7 | * 計算 1+2+3+...+n 8 | * 9 | * @param n 欲計算的索引數 10 | * @return 總和 11 | */ 12 | int sum(int n); 13 | } 14 | -------------------------------------------------------------------------------- /09. Recursion/9.2 尾端遞迴 - 自然數總和/PartialSumsB.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public interface PartialSumsB { 5 | 6 | /** 7 | * 計算 1+2+3+...+n 8 | * 9 | * @param n 欲計算的索引數 10 | * @param total 目前的總和 11 | * @return 總和 12 | */ 13 | int sum(int n, int total); 14 | } 15 | -------------------------------------------------------------------------------- /09. Recursion/9.3 經典遞迴 - 費式數列/Fib.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public interface Fib { 5 | 6 | /** 7 | * 計算費式數列 8 | */ 9 | int fib(int n); 10 | } 11 | -------------------------------------------------------------------------------- /09. Recursion/9.3 經典遞迴 - 費式數列/RecursiveFunction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public class RecursiveFunction implements Fib { 5 | 6 | 7 | @Override 8 | public int fib(int n) { 9 | 10 | if (n == 0) { 11 | return 0; 12 | } else if (n == 1) { 13 | return 1; 14 | } else { 15 | return fib(n - 1) + fib(n - 2); 16 | } 17 | 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /09. Recursion/9.4 經典遞迴 - 河內塔/HanoiTower.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public interface HanoiTower { 5 | 6 | 7 | /** 8 | * 計算河內塔 9 | * 10 | * @param n 搬移的盤子數目 11 | * @param a 來源地 (source) 12 | * @param b 中繼站 (bridge) 13 | * @param c 目的地 (destination) 14 | * @return 15 | */ 16 | void hanoi(int n, String a, String b, String c); 17 | } 18 | -------------------------------------------------------------------------------- /09. Recursion/9.4 經典遞迴 - 河內塔/Main.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public class Main { 5 | 6 | public static void main(String[] args) { 7 | 8 | String a = "塔A"; 9 | String b = "塔B"; 10 | String c = "塔C"; 11 | 12 | int n = 3; // 欲計算之值 13 | 14 | HanoiTower recursiveFunction = new RecursiveFunction(); 15 | 16 | recursiveFunction.hanoi(n, a, b, c); 17 | 18 | 19 | } 20 | 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /09. Recursion/9.4 經典遞迴 - 河內塔/RecursiveFunction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2016/12/24. 3 | */ 4 | public class RecursiveFunction implements HanoiTower { 5 | 6 | 7 | @Override 8 | public void hanoi(int n, String a, String b, String c) { 9 | if (n == 1) { // 只有一個盤子 10 | System.out.println("將盤子從" + a + " 搬到" + c); 11 | } else { 12 | hanoi(n - 1, a, c, b); // 先搬 n-1 個盤子 到 b (將 c 當中繼) 13 | hanoi(1, a, b, c); // 將剩下的一個盤子 由 a 搬到 c 14 | hanoi(n - 1, b, a, c); // 將剛剛 塔b 的 n-1 個盤子 再由 b 搬到 c (a 當中繼) 15 | 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /10. Observer-Pattern/ConcreteObserverA.java: -------------------------------------------------------------------------------- 1 | public class ConcreteObserverA implements Observer { 2 | 3 | private String observerState; 4 | 5 | private ConcreteSubject concreteSubject; // 持有指向 ConcreteSubject 物件的 reference 6 | 7 | public ConcreteObserverA(ConcreteSubject concreteSubject) { 8 | this.concreteSubject = concreteSubject; 9 | } 10 | 11 | @Override 12 | public void update() { 13 | this.observerState = concreteSubject.getState(); 14 | System.out.println(getClass().getSimpleName() + " 收到通知"); 15 | System.out.println(observerState); 16 | System.out.println(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /10. Observer-Pattern/ConcreteObserverB.java: -------------------------------------------------------------------------------- 1 | public class ConcreteObserverB implements Observer { 2 | 3 | private String observerState; 4 | 5 | private ConcreteSubject concreteSubject; // 持有指向 ConcreteSubject 物件的 reference 6 | 7 | public ConcreteObserverB(ConcreteSubject concreteSubject) { 8 | this.concreteSubject = concreteSubject; 9 | } 10 | 11 | @Override 12 | public void update() { 13 | this.observerState = concreteSubject.getState(); 14 | System.out.println(getClass().getSimpleName() + " 收到通知"); 15 | System.out.println(observerState); 16 | System.out.println(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /10. Observer-Pattern/ConcreteObserverC.java: -------------------------------------------------------------------------------- 1 | public class ConcreteObserverC implements Observer { 2 | 3 | private String observerState; 4 | 5 | private ConcreteSubject concreteSubject; // 持有指向 ConcreteSubject 物件的 reference 6 | 7 | public ConcreteObserverC(ConcreteSubject concreteSubject) { 8 | this.concreteSubject = concreteSubject; 9 | } 10 | 11 | @Override 12 | public void update() { 13 | this.observerState = concreteSubject.getState(); 14 | System.out.println(getClass().getSimpleName() + " 收到通知"); 15 | System.out.println(observerState); 16 | System.out.println(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /10. Observer-Pattern/Observer.java: -------------------------------------------------------------------------------- 1 | interface Observer { 2 | 3 | /** 4 | * 供 Subject 狀態改變時予以通知 5 | * 以更新狀態 6 | */ 7 | void update(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /10. Observer-Pattern/Subject.java: -------------------------------------------------------------------------------- 1 | interface Subject { 2 | 3 | /** 4 | * 新增 觀察者 5 | * 6 | * @param observer 抽象的觀察者,不需知道其具體類別為何、實作的細節... 7 | */ 8 | void attach(Observer observer); 9 | 10 | /** 11 | * 移除 觀察者 12 | * 13 | * @param observer 抽象的觀察者,不需知道其具體類別為何、實作的細節... 14 | */ 15 | void detach(Observer observer); 16 | 17 | /** 18 | * 當 主題狀態 發生變化 19 | * 通知所有已訂閱的觀察者 20 | */ 21 | void notifyObservers(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /19. Byte-Order/CheckByteOrder/C/check_byte_order.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | int i = 1; 5 | char *c = (char *) &i; 6 | 7 | if (*c) 8 | printf("LITTLE_ENDIAN\n"); 9 | else 10 | printf("BIG_ENDIAN\n"); 11 | 12 | return 0; 13 | } -------------------------------------------------------------------------------- /19. Byte-Order/CheckByteOrder/C/check_byte_order2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | int num = 0x1234ABCD; 5 | 6 | // 指標轉型: 將位址轉型為 指向 char 7 | char *ptrNum = (char *) # 8 | 9 | for (int i = 0; i < 4; i++) { 10 | printf("%p: %02x \n", (void *) ptrNum, (unsigned char) *ptrNum++); 11 | } 12 | 13 | return 0; 14 | } -------------------------------------------------------------------------------- /19. Byte-Order/CheckByteOrder/Java/main.java: -------------------------------------------------------------------------------- 1 | import java.nio.ByteOrder; 2 | 3 | public class CheckByteOrder { 4 | 5 | public static void main(String[] args) { 6 | 7 | System.out.println(ByteOrder.nativeOrder()); 8 | 9 | } 10 | } 11 | 12 | 13 | -------------------------------------------------------------------------------- /19. Byte-Order/CheckByteOrder/JavaScript/checkByteOrder.js: -------------------------------------------------------------------------------- 1 | // 實例含有整數 1 的 ArrayBuffer 2 | var buf = new Int32Array([1]).buffer; 3 | 4 | // 以 8 bits 來 "view" (檢視) ArrayBuffer, 5 | // 因此此陣列長度為 4 6 | // 若為 小頭端,元素分別為 01 00 00 00 (hex) 7 | // 若為 大頭端,元素分別為 00 00 00 01 (hex) 8 | var endianness = new Int8Array(buf); 9 | 10 | // 位元組順序 之 檢測結果 11 | var result = "BIG_ENDIAN"; 12 | 13 | // 檢查到底是 01 還是 00 14 | if (endianness[0] === 1) { 15 | result = "LITTLE_ENDIAN"; 16 | } 17 | 18 | // 輸出結果 19 | console.log(result); 20 | alert(result); -------------------------------------------------------------------------------- /19. Byte-Order/CheckByteOrder/PHP/check_byte_order.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Post Demo 5 | 6 | 7 | 8 | 9 | 22 | 23 | -------------------------------------------------------------------------------- /29. XMLHttpRequest/its-you.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JS-Zheng/blog/f72fbfb83d62a17fbc976b51f11bb9172ed91596/29. XMLHttpRequest/its-you.jpg -------------------------------------------------------------------------------- /31. Fetch-API/Nobita.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JS-Zheng/blog/f72fbfb83d62a17fbc976b51f11bb9172ed91596/31. Fetch-API/Nobita.jpg -------------------------------------------------------------------------------- /31. Fetch-API/img/GitHub-Mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JS-Zheng/blog/f72fbfb83d62a17fbc976b51f11bb9172ed91596/31. Fetch-API/img/GitHub-Mark.png -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "nikic/php-parser": "^3.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/index.php: -------------------------------------------------------------------------------- 1 | create(ParserFactory::PREFER_PHP7); 18 | 19 | try { 20 | $stmts = $parser->parse($code); 21 | echo "
";
22 |     print_r($stmts);
23 |     echo "
"; 24 | } catch (Error $e) { 25 | echo 'Parse Error: ', $e->getMessage(); 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/nikic/php-parser/lib/PhpParser'), 10 | ); 11 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | grammar/kmyacc.exe 4 | grammar/y.output 5 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/grammar/tokens.template: -------------------------------------------------------------------------------- 1 | semValue 4 | #semval($,%t) $this->semValue 5 | #semval(%n) $this->stackPos-(%l-%n) 6 | #semval(%n,%t) $this->stackPos-(%l-%n) 7 | 8 | namespace PhpParser\Parser; 9 | #include; 10 | 11 | /* GENERATED file based on grammar/tokens.y */ 12 | final class Tokens 13 | { 14 | #tokenval 15 | const %s = %n; 16 | #endtokenval 17 | } 18 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Builder.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php: -------------------------------------------------------------------------------- 1 | vars = $vars; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('vars'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php: -------------------------------------------------------------------------------- 1 | var = $var; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('var'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php: -------------------------------------------------------------------------------- 1 | var = $var; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('var'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php: -------------------------------------------------------------------------------- 1 | var = $var; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('var'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php: -------------------------------------------------------------------------------- 1 | var = $var; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('var'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php: -------------------------------------------------------------------------------- 1 | name = $name; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('name'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php: -------------------------------------------------------------------------------- 1 | type = $type; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('type'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php: -------------------------------------------------------------------------------- 1 | exprs = $exprs; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('exprs'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php: -------------------------------------------------------------------------------- 1 | stmts = $stmts; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('stmts'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php: -------------------------------------------------------------------------------- 1 | stmts = $stmts; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('stmts'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php: -------------------------------------------------------------------------------- 1 | name = $name; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('name'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php: -------------------------------------------------------------------------------- 1 | value = $value; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('value'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php: -------------------------------------------------------------------------------- 1 | name = $name; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('name'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php: -------------------------------------------------------------------------------- 1 | expr = $expr; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('expr'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php: -------------------------------------------------------------------------------- 1 | vars = $vars; 21 | } 22 | 23 | public function getSubNodeNames() { 24 | return array('vars'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php: -------------------------------------------------------------------------------- 1 | assertTrue(class_exists('PhpParser\NodeVisitorAbstract')); 10 | $this->assertFalse(class_exists('PHPParser_NodeVisitor_NameResolver')); 11 | 12 | $this->assertFalse(class_exists('PhpParser\FooBar')); 13 | $this->assertFalse(class_exists('PHPParser_FooBar')); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php: -------------------------------------------------------------------------------- 1 | handleError(new Error('Test')); 15 | } 16 | } -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php: -------------------------------------------------------------------------------- 1 | bar; 5 | ----- 6 | !!php7 7 | Syntax error, unexpected T_OBJECT_OPERATOR, expecting ';' from 2:13 to 2:14 8 | array( 9 | 0: Stmt_Global( 10 | vars: array( 11 | 0: Expr_Variable( 12 | name: Expr_Variable( 13 | name: foo 14 | ) 15 | ) 16 | ) 17 | ) 18 | 1: Expr_ConstFetch( 19 | name: Name( 20 | parts: array( 21 | 0: bar 22 | ) 23 | ) 24 | ) 25 | ) -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/code/parser/scalar/invalidOctal.test: -------------------------------------------------------------------------------- 1 | Invalid octal literals 2 | ----- 3 | 9 | #!/usr/bin/env php 10 | ----- 11 | array( 12 | 0: Stmt_InlineHTML( 13 | value: #!/usr/bin/env php 14 | 15 | ) 16 | 1: Stmt_Echo( 17 | exprs: array( 18 | 0: Scalar_String( 19 | value: foobar 20 | ) 21 | ) 22 | ) 23 | 2: Stmt_InlineHTML( 24 | value: #!/usr/bin/env php 25 | ) 26 | ) 27 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/code/parser/stmt/inlineHTML.test: -------------------------------------------------------------------------------- 1 | Inline HTML 2 | ----- 3 | 6 | B 7 | 10 | a = $a; 11 | } 12 | }; 13 | ----- 14 | new class 15 | { 16 | }; 17 | new class extends A implements B, C 18 | { 19 | }; 20 | new class($a) extends A 21 | { 22 | private $a; 23 | public function __construct($a) 24 | { 25 | $this->a = $a; 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test: -------------------------------------------------------------------------------- 1 | Array destructuring 2 | ----- 3 | $b, 'b' => $a] = $baz; 9 | ----- 10 | !!php7 11 | [$a, $b] = [$c, $d]; 12 | [, $a, , , $b, ] = $foo; 13 | [, [[$a]], $b] = $bar; 14 | ['a' => $b, 'b' => $a] = $baz; -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/code/prettyPrinter/expr/call.test: -------------------------------------------------------------------------------- 1 | Calls 2 | ----- 3 | 'b', 'c' => 'd']; 8 | ----- 9 | []; 10 | array(1, 2, 3); 11 | ['a' => 'b', 'c' => 'd']; -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/code/prettyPrinter/expr/stringEscaping.test: -------------------------------------------------------------------------------- 1 | Escape sequences in double-quoted strings 2 | ----- 3 | b)(); 12 | (A::$b)(); 13 | ----- 14 | !!php7 15 | (function () { 16 | })(); 17 | array('a', 'b')()(); 18 | A::$b::$c; 19 | $A::$b[$c](); 20 | $A::{$b[$c]}(); 21 | A::${$b}[$c](); 22 | ($a->b)(); 23 | (A::$b)(); 24 | -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test: -------------------------------------------------------------------------------- 1 | File containing only inline HTML 2 | ----- 3 | Hallo World 4 | Foo Bar 5 | Bar Foo 6 | World Hallo 7 | ----- 8 | Hallo World 9 | Foo Bar 10 | Bar Foo 11 | World Hallo 12 | ----- 13 | 14 | 15 | Test 16 | ----- 17 | 18 | 19 | Test -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test: -------------------------------------------------------------------------------- 1 | File containing only PHP 2 | ----- 3 | $val) { 14 | 15 | } 16 | 17 | foreach ($arr as $key => &$val) { 18 | 19 | } 20 | ----- 21 | foreach ($arr as $val) { 22 | } 23 | foreach ($arr as &$val) { 24 | } 25 | foreach ($arr as $key => $val) { 26 | } 27 | foreach ($arr as $key => &$val) { 28 | } -------------------------------------------------------------------------------- /32. Server-Cache/01. 抽象語法樹 (AST)/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/global_static_variables.test: -------------------------------------------------------------------------------- 1 | Global and static variables 2 | ----- 3 | 3 | 4 | 5 |

Hello, World!

6 |

頁面生成於: 2017-07-07 11:34:03

7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /32. Server-Cache/02. 頁面快取/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

Hello, World!

7 |

頁面生成於:

8 | 9 | 10 | 11 | array($vendorDir . '/predis/predis/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/VERSION: -------------------------------------------------------------------------------- 1 | 1.1.1 2 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/autoload.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | require __DIR__.'/src/Autoloader.php'; 13 | 14 | Predis\Autoloader::register(); 15 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/ClientException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis; 13 | 14 | /** 15 | * Exception class that identifies client-side errors. 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ClientException extends PredisException 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Cluster/Distributor/EmptyRingException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Cluster\Distributor; 13 | 14 | /** 15 | * Exception class that identifies empty rings. 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class EmptyRingException extends \Exception 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ConnectionAuth.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/auth 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ConnectionAuth extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'AUTH'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ConnectionEcho.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/echo 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ConnectionEcho extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ECHO'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ConnectionPing.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/ping 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ConnectionPing extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'PING'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ConnectionQuit.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/quit 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ConnectionQuit extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'QUIT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ConnectionSelect.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/select 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ConnectionSelect extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SELECT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/GeospatialGeoDist.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/geodist 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class GeospatialGeoDist extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'GEODIST'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashExists.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hexists 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashExists extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HEXISTS'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashGet.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hget 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashGet extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HGET'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashIncrementBy.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hincrby 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashIncrementBy extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HINCRBY'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashIncrementByFloat.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hincrbyfloat 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashIncrementByFloat extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HINCRBYFLOAT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashKeys.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hkeys 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashKeys extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HKEYS'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashLength.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hlen 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashLength extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HLEN'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashSet.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hset 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashSet extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HSET'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashSetPreserve.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hsetnx 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashSetPreserve extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HSETNX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashStringLength.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hstrlen 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashStringLength extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HSTRLEN'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/HashValues.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/hvals 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class HashValues extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'HVALS'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyDump.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/dump 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyDump extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'DUMP'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyExists.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/exists 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyExists extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'EXISTS'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyExpire.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/expire 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyExpire extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'EXPIRE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyExpireAt.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/expireat 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyExpireAt extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'EXPIREAT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyKeys.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/keys 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyKeys extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'KEYS'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyMove.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/move 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyMove extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'MOVE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyPersist.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/persist 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyPersist extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'PERSIST'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyPreciseExpire.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/pexpire 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyPreciseExpire extends KeyExpire 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'PEXPIRE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyPreciseExpireAt.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/pexpireat 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyPreciseExpireAt extends KeyExpireAt 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'PEXPIREAT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyPreciseTimeToLive.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/pttl 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyPreciseTimeToLive extends KeyTimeToLive 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'PTTL'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyRename.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/rename 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyRename extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'RENAME'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyRenamePreserve.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/renamenx 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyRenamePreserve extends KeyRename 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'RENAMENX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyRestore.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/restore 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyRestore extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'RESTORE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyTimeToLive.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/ttl 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyTimeToLive extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'TTL'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/KeyType.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/type 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class KeyType extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'TYPE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListIndex.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/lindex 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListIndex extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LINDEX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListInsert.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/linsert 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListInsert extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LINSERT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListLength.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/llen 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListLength extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LLEN'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListPopFirst.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/lpop 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListPopFirst extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LPOP'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListPopLast.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/rpop 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListPopLast extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'RPOP'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListPopLastBlocking.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/brpop 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListPopLastBlocking extends ListPopFirstBlocking 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'BRPOP'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListPopLastPushHead.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/rpoplpush 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListPopLastPushHead extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'RPOPLPUSH'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListPopLastPushHeadBlocking.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/brpoplpush 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListPopLastPushHeadBlocking extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'BRPOPLPUSH'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListPushHead.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/lpush 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListPushHead extends ListPushTail 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LPUSH'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListPushHeadX.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/lpushx 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListPushHeadX extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LPUSHX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListPushTailX.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/rpushx 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListPushTailX extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'RPUSHX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListRange.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/lrange 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListRange extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LRANGE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListRemove.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/lrem 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListRemove extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LREM'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListSet.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/lset 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListSet extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LSET'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ListTrim.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/ltrim 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ListTrim extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LTRIM'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/PubSubPublish.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/publish 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class PubSubPublish extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'PUBLISH'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/PubSubSubscribeByPattern.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/psubscribe 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class PubSubSubscribeByPattern extends PubSubSubscribe 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'PSUBSCRIBE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/PubSubUnsubscribeByPattern.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/punsubscribe 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class PubSubUnsubscribeByPattern extends PubSubUnsubscribe 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'PUNSUBSCRIBE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/command 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerCommand extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'COMMAND'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerDatabaseSize.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/dbsize 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerDatabaseSize extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'DBSIZE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerFlushAll.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/flushall 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerFlushAll extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'FLUSHALL'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerFlushDatabase.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/flushdb 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerFlushDatabase extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'FLUSHDB'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerLastSave.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/lastsave 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerLastSave extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'LASTSAVE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerMonitor.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/monitor 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerMonitor extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'MONITOR'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerObject.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/object 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerObject extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'OBJECT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerSave.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/save 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerSave extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SAVE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerScript.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/script 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerScript extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SCRIPT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerShutdown.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/shutdown 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerShutdown extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SHUTDOWN'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ServerTime.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/time 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ServerTime extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'TIME'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetCardinality.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/scard 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetCardinality extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SCARD'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetDifference.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/sdiff 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetDifference extends SetIntersection 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SDIFF'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetDifferenceStore.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/sdiffstore 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetDifferenceStore extends SetIntersectionStore 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SDIFFSTORE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetIsMember.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/sismember 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetIsMember extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SISMEMBER'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetMembers.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/smembers 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetMembers extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SMEMBERS'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetMove.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/smove 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetMove extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SMOVE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetPop.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/spop 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetPop extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SPOP'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetRandomMember.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/srandmember 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetRandomMember extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SRANDMEMBER'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetUnion.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/sunion 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetUnion extends SetIntersection 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SUNION'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/SetUnionStore.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/sunionstore 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class SetUnionStore extends SetIntersectionStore 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SUNIONSTORE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringAppend.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/append 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringAppend extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'APPEND'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringBitCount.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/bitcount 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringBitCount extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'BITCOUNT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringBitField.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/bitfield 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringBitField extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'BITFIELD'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringBitPos.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/bitpos 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringBitPos extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'BITPOS'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringDecrement.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/decr 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringDecrement extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'DECR'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringDecrementBy.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/decrby 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringDecrementBy extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'DECRBY'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringGet.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/get 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringGet extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'GET'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringGetBit.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/getbit 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringGetBit extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'GETBIT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringGetRange.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/getrange 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringGetRange extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'GETRANGE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringGetSet.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/getset 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringGetSet extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'GETSET'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringIncrement.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/incr 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringIncrement extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'INCR'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringIncrementBy.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/incrby 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringIncrementBy extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'INCRBY'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringIncrementByFloat.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/incrbyfloat 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringIncrementByFloat extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'INCRBYFLOAT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringPreciseSetExpire.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/psetex 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringPreciseSetExpire extends StringSetExpire 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'PSETEX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringSet.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/set 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringSet extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SET'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringSetBit.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/setbit 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringSetBit extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SETBIT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringSetExpire.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/setex 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringSetExpire extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SETEX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringSetMultiplePreserve.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/msetnx 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringSetMultiplePreserve extends StringSetMultiple 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'MSETNX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringSetPreserve.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/setnx 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringSetPreserve extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SETNX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringSetRange.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/setrange 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringSetRange extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SETRANGE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringStrlen.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/strlen 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringStrlen extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'STRLEN'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/StringSubstr.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/substr 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class StringSubstr extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'SUBSTR'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/TransactionDiscard.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/discard 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class TransactionDiscard extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'DISCARD'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/TransactionExec.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/exec 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class TransactionExec extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'EXEC'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/TransactionMulti.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/multi 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class TransactionMulti extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'MULTI'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/TransactionUnwatch.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/unwatch 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class TransactionUnwatch extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'UNWATCH'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetCardinality.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zcard 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetCardinality extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZCARD'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetCount.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zcount 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetCount extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZCOUNT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetIncrementBy.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zincrby 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetIncrementBy extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZINCRBY'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetIntersectionStore.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zinterstore 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetIntersectionStore extends ZSetUnionStore 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZINTERSTORE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetLexCount.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zlexcount 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetLexCount extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZLEXCOUNT'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetRank.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zrank 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetRank extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZRANK'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetRemoveRangeByLex.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zremrangebylex 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetRemoveRangeByLex extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZREMRANGEBYLEX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetRemoveRangeByRank.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zremrangebyrank 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetRemoveRangeByRank extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZREMRANGEBYRANK'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetRemoveRangeByScore.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zremrangebyscore 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetRemoveRangeByScore extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZREMRANGEBYSCORE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetReverseRange.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zrevrange 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetReverseRange extends ZSetRange 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZREVRANGE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetReverseRangeByLex.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zrevrangebylex 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetReverseRangeByLex extends ZSetRangeByLex 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZREVRANGEBYLEX'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetReverseRangeByScore.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zrevrangebyscore 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetReverseRangeByScore extends ZSetRangeByScore 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZREVRANGEBYSCORE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetReverseRank.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zrevrank 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetReverseRank extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZREVRANK'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Command/ZSetScore.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Command; 13 | 14 | /** 15 | * @link http://redis.io/commands/zscore 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | class ZSetScore extends Command 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function getId() 25 | { 26 | return 'ZSCORE'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Connection/ConnectionException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Connection; 13 | 14 | use Predis\CommunicationException; 15 | 16 | /** 17 | * Exception class that identifies connection-related errors. 18 | * 19 | * @author Daniele Alessandri 20 | */ 21 | class ConnectionException extends CommunicationException 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/NotSupportedException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis; 13 | 14 | /** 15 | * Exception class thrown when trying to use features not supported by certain 16 | * classes or abstractions of Predis. 17 | * 18 | * @author Daniele Alessandri 19 | */ 20 | class NotSupportedException extends PredisException 21 | { 22 | } 23 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/PredisException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis; 13 | 14 | /** 15 | * Base exception class for Predis-related errors. 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | abstract class PredisException extends \Exception 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Protocol/ProtocolException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Protocol; 13 | 14 | use Predis\CommunicationException; 15 | 16 | /** 17 | * Exception used to indentify errors encountered while parsing the Redis wire 18 | * protocol. 19 | * 20 | * @author Daniele Alessandri 21 | */ 22 | class ProtocolException extends CommunicationException 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Replication/MissingMasterException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Replication; 13 | 14 | use Predis\ClientException; 15 | 16 | /** 17 | * Exception class that identifies when master is missing in a replication setup. 18 | * 19 | * @author Daniele Alessandri 20 | */ 21 | class MissingMasterException extends ClientException 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Replication/RoleException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Replication; 13 | 14 | use Predis\CommunicationException; 15 | 16 | /** 17 | * Exception class that identifies a role mismatch when connecting to node 18 | * managed by redis-sentinel. 19 | * 20 | * @author Daniele Alessandri 21 | */ 22 | class RoleException extends CommunicationException 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /32. Server-Cache/03. predis-demo/vendor/predis/predis/src/Response/ResponseInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Predis\Response; 13 | 14 | /** 15 | * Represents a complex response object from Redis. 16 | * 17 | * @author Daniele Alessandri 18 | */ 19 | interface ResponseInterface 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /32. Server-Cache/04. LRUCache/Main.java: -------------------------------------------------------------------------------- 1 | // From LeetCode 146. LRU Cache 2 | // https://discuss.leetcode.com/topic/6613/java-hashtable-double-linked-list-with-a-touch-of-pseudo-nodes 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | LRUCache cache = new LRUCache(2 /* capacity */); 7 | 8 | cache.set(1, 1); 9 | cache.set(2, 2); 10 | cache.get(1); // returns 1 11 | cache.set(3, 3); // evicts key 2 12 | cache.get(2); // returns -1 (not found) 13 | cache.set(4, 4); // evicts key 1 14 | cache.get(1); // returns -1 (not found) 15 | cache.get(3); // returns 3 16 | cache.get(4); // returns 4 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /40. HTTP Representation/Content-Encoding Demo/java/ReqResService.java: -------------------------------------------------------------------------------- 1 | import okhttp3.RequestBody; 2 | import retrofit2.Call; 3 | import retrofit2.http.*; 4 | 5 | /** 6 | * Created by zhengzhongsheng on 2017/6/9. 7 | */ 8 | interface ReqResService { 9 | 10 | @FormUrlEncoded 11 | @POST("/api/register") 12 | Call registerUser(@Field("email") String email, @Field("password") String password); 13 | 14 | 15 | @Headers({ 16 | "Content-Type: application/x-www-form-urlencoded; charset=UTF-8", 17 | "Content-Encoding: gzip", 18 | }) 19 | @POST("/api/register") 20 | Call registerUserByGzipRequest(@Body RequestBody body); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /40. HTTP Representation/Content-Encoding Demo/java/ResponseHandler.java: -------------------------------------------------------------------------------- 1 | import retrofit2.Response; 2 | 3 | /** 4 | * Created by zhengzhongsheng on 2017/6/9. 5 | */ 6 | public interface ResponseHandler { 7 | void resolve(Response res); 8 | } 9 | -------------------------------------------------------------------------------- /40. HTTP Representation/Content-Encoding Demo/java/Result.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengzhongsheng on 2017/6/9. 3 | */ 4 | public class Result { 5 | String token; 6 | } 7 | -------------------------------------------------------------------------------- /40. HTTP Representation/Content-Encoding Demo/java/RetrofitFactory.java: -------------------------------------------------------------------------------- 1 | import retrofit2.Retrofit; 2 | import retrofit2.converter.gson.GsonConverterFactory; 3 | 4 | /** 5 | * Created by zhengzhongsheng on 2017/6/9. 6 | */ 7 | class RetrofitFactory { 8 | static Retrofit create() { 9 | return new Retrofit.Builder() 10 | .baseUrl("https://reqres.in") 11 | .addConverterFactory(GsonConverterFactory.create()) 12 | .build(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /40. HTTP Representation/Content-Encoding Demo/sh/Request.sh: -------------------------------------------------------------------------------- 1 | ## Payload 2 | echo "email=jason%40gg&password=9487" | gzip -c > payload.gz; 3 | 4 | ## Request 5 | curl --data-binary @payload.gz \ 6 | -X "POST" "https://reqres.in/api/register" \ 7 | -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \ 8 | -H "Content-Encoding: gzip" -------------------------------------------------------------------------------- /52. HTTP Message Tracing/GetIpAddress.php: -------------------------------------------------------------------------------- 1 | My Blog (NotFalse) 之程式範例 3 | --------------------------------------------------------------------------------