Skip to content

Instantly share code, notes, and snippets.

View skurfuerst's full-sized avatar
☀️

Sebastian Kurfürst skurfuerst

☀️
View GitHub Profile
<?php
/**
* Returns the content specified by $locale.
*
* This function tries to return a content object which strictly matches the locale of the given
* context. If no such content exists it will try to find a content object which is suggested by
* the context's fallback strategy.
*
* @param \F3\TYPO3\Domain\Service\ContentContext $contentContext Context the content should match
* @return \F3\TYPO3\Domain\Model\Content\ContentInterface The content object or NULL if none matched the given context
Asdf
sad
fs
sd
dsfs
fdsf
<?php
$controllerObjectName = 'F3\Foo\Bla\Controller\Abc\Xyz\QuuxController';
$controllerObjectName = 'F3\Foo\Service\Rest\V1\QuuxController';
$matches = array();
preg_match('/
^F3
\\\\(?P<packageKey>[^\\\\]+)
(
\\\\Controller
protected function determineTypeConverter($source, $targetType, \F3\FLOW3\Property\PropertyMappingConfigurationInterface $configuration) {
if ($configuration->getTypeConverter() !== NULL) return $configuration->getTypeConverter();
$sourceType = $this->determineSourceType($source);
if (!is_string($targetType)) {
throw new \F3\FLOW3\Property\Exception\InvalidTargetException('The target type was no string, but of type "' . gettype($targetType) . '"', 1297941727);
}
if (in_array($targetType, array('array', 'string', 'float', 'integer', 'boolean'))) {
eval('
' . $abstractModifier . 'class ' . $accessibleClassName . ' extends ' . $className . ' {
public function _call($methodName) {
$args = func_get_args();
return call_user_func_array(array($this, $methodName), array_slice($args, 1));
}
public function _callRef($methodName, &$arg1 = NULL, &$arg2 = NULL, &$arg3 = NULL, &$arg4 = NULL, &$arg5= NULL, &$arg6 = NULL, &$arg7 = NULL, &$arg8 = NULL, &$arg9 = NULL) {
switch (func_num_args()) {
case 0 : return $this->$methodName();
case 1 : return $this->$methodName($arg1);
# #
# Example Settings #
# #
# This file contains settings for various parts of the application. #
# Copy this file to Settings.yaml, and adjust as necessary. #
# #
# Please refer to the default settings file(s) or the manuals for #
# possible configuration options. #
# #
skurfuerst:FLOW3Base sebastian$ phpunit -c Build/Common/PhpUnit/UnitTests.xml --coverage-html /tmp/asdf/ Packages/Framework/FLOW3/Tests/Unit/Log/
PHPUnit 3.5.13 by Sebastian Bergmann.
.......S......
Time: 1 second, Memory: 9.00Mb
OK, but incomplete or skipped tests!
Tests: 14, Assertions: 16, Skipped: 1.
$account = new \F3\FLOW3\Security\Account();
$account->setAccountIdentifier($accountJson->username);
$person = new Person();
$firstnameAndLastname = explode(' ', $accountJson->name, 2);
$firstName = '';
$lastName = '';
if (isset($firstnameAndLastname[0])) {
Uncaught Exception in FLOW3
#1216919280: You are not allowed to perform this action. (More information)
F3\FLOW3\Security\Exception\AccessDeniedException thrown in file
/opt/local/apache2/htdocs/Conference/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_Security_Authorization_Interceptor_AccessDeny_Original.php in line 41.
Go to the FORGE issue tracker and report the issue - if you think it is a bug!
13 F3\FLOW3\Security\Authorization\Interceptor\AccessDeny_Original::invoke()
/**
* @test
* @author Bastian Waidelich <[email protected]>
*/
public function packageKeyCanBeOverwrittenByRequest() {
$packageKey = NULL;
$setControllerPackageKeyCallback = function() use (&$packageKey) {
$args = func_get_args();
$packageKey = $args[0];
};