Just one year after its 1.0 release, TYPO3 Flow (formerly known as FLOW3) raises the version number to introduce a couple of new major features. In this session youâll get a compact introduction into the comprehensive Composer support, automatic code migration, distributed session handling and new features coming up in the next version of Flow.
2. TEXT HERE
project founder of TYPO3 Flow and TYPO3 Neos
co-founder of the TYPO3 Association
coach, coder, consultant
37 years old
lives in LĂŒbeck, Germany
1 wife, 2 daughters, 1 espresso machine
likes drumming
43. Network Working Group R. Fielding
Request for Comments: 2616 UC Irvine
Obsoletes: 2068 J. Gettys
Category: Standards Track Compaq/W3C
J. Mogul
Compaq
H. Frystyk
W3C/MIT
L. Masinter
Xerox
P. Leach
Microsoft
T. Berners-Lee
W3C/MIT
June 1999
Hypertext Transfer Protocol -- HTTP/1.1
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
44. 9.1 Safe and Idempotent Methods
9.1.1 Safe Methods
Implementors should be aware that the software represents the user in
their interactions over the Internet, and should be careful to allow the
user to be aware of any actions they might take which may have an
unexpected significance to themselves or others.
In particular, the convention has been established that the GET and HEAD
methods SHOULD NOT have the significance of taking an action other than
retrieval. These methods ought to be considered "safe". This allows user
agents to represent other methods, such as POST, PUT and DELETE, in a
special way, so that the user is made aware of the fact that a possibly
unsafe action is being requested.
Naturally, it is not possible to ensure that the server does not generate
side-effects as a result of performing a GET request; in fact, some
dynamic resources consider that a feature. The important distinction here
is that the user did not request the side-effects, so therefore cannot be
held accountable for them.
9.1.2 Idempotent Methods
48. /**
* Returns a map of action method names and their parameters.
*
* @return array Array of method parameters by action name
*/
public function getActionMethodParameters() {
$methodParameters = $this->reflectionService->getMethodParameters(
get_class($this), $this->actionMethodName);
foreach ($methodParameters as $parameterName => $parameterInfo) {
...
}
return $methodParameters;
}
}
55. class BookController extends ActionController {
âŠ
public function myAction() {
// $this->bookRepository is instance of Dependency Proxy
$this->bookRepository->findAll();
// $this->bookRepository is the real BookRepository
}
}
57. // $this->bookRepository is maybe instance of Dependency Proxy
if ($this->bookRepository instanceof DependencyProxy) {
$this->bookRepository->_activateDependency();
}
// $this->bookRepository is the real BookRepository
$this->otherService->otherMethod($this->bookRepository);
60. resource:
# Definition of resource storages provided by the Flow core.
# Storages are used for storing and retrieving resources.
storages:
#
defaultPersistentResourcesStorage:
storage: 'TYPO3FlowResourceStorageFileSystemStorage'
storageOptions:
path: %FLOW_PATH_DATA%Persistent/Resources/
# Definition of the default resource collections.
# Collections are used to bundle / group static or persistent resources
# for common processing and publication.
collections:
# Collection which contains all persistent resources
persistentResources:
sources:
-
storage: 'defaultPersistentResourcesStorage'
target: 'localWebDirectoryPersistentResourcesTarget'
# Definition of the basic resource publication targets.
targets:
# Target for publishing persistent resources to the local web directory
localWebDirectoryPersistentResourcesTarget:
target: 'TYPO3FlowResourceTargetFileSystemTarget'
targetOptions:
path: '%FLOW_PATH_WEB%_Resources/Persistent/'
baseUri: '_Resources/Persistent/'
mirrorMode: 'link'
73. class BookController extends ActionController {
âŠ
public function myAction() {
// $this->bookRepository is instance of Dependency Proxy
$this->bookRepository->findAll();
// $this->bookRepository is the real BookRepository
}
}
77. class BookController extends ActionController {
âŠ
public function myAction() {
$this->bookRepository->findAll();
}
}
78. class DependencyProxy {
âŠ
/**
* Proxy magic call method which triggers the injection of the real dependency
* and returns the result of a call to the original method in the dependency
*
* @param string $methodName Name of the method to be called
* @param array $arguments An array of arguments to be passed to the method
* @return mixed
*/
public function __call($methodName, array $arguments) {
return call_user_func_array(array($this->_activateDependency(), $methodName),
$arguments);
}
/**
* Activate the dependency and set it in the object.
*
* @return object The real dependency object
* @api
*/
public function _activateDependency() {
$realDependency = $this->builder->__invoke();
foreach($this->propertyVariables as &$propertyVariable) {
$propertyVariable = $realDependency;
}
return $realDependency;
}