@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | * setFormgenMapper |
| 386 | 386 | * @param FormgenMapper $formgenMapper |
| 387 | 387 | * |
| 388 | - * @return PlaygroundCore\Mapper\FormGen FormGen |
|
| 388 | + * @return Formgen FormGen |
|
| 389 | 389 | */ |
| 390 | 390 | public function setFormgenMapper($formgenMapper) |
| 391 | 391 | { |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | * setOptions |
| 399 | 399 | * @param ModuleOptions $options |
| 400 | 400 | * |
| 401 | - * @return PlaygroundCore\Service\Locale $this |
|
| 401 | + * @return Formgen $this |
|
| 402 | 402 | */ |
| 403 | 403 | public function setOptions(ModuleOptions $options) |
| 404 | 404 | { |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | * Set service manager instance |
| 436 | 436 | * |
| 437 | 437 | * @param ServiceManager $serviceManager |
| 438 | - * @return User |
|
| 438 | + * @return Formgen |
|
| 439 | 439 | */ |
| 440 | 440 | public function setServiceManager(ServiceManager $serviceManager) |
| 441 | 441 | { |
@@ -18,9 +18,9 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | protected $formgenMapper; |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * @var localeService |
|
| 23 | - */ |
|
| 21 | + /** |
|
| 22 | + * @var localeService |
|
| 23 | + */ |
|
| 24 | 24 | protected $localeService; |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -88,23 +88,21 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | $a = array(); |
| 90 | 90 | |
| 91 | - $a['name'] = isset($attributes->name)? $attributes->name : ''; |
|
| 92 | - $a['placeholder'] = isset($attributes->data->placeholder)? $attributes->data->placeholder : ''; |
|
| 93 | - $a['label'] = isset($attributes->data->label)? $attributes->data->label : ''; |
|
| 94 | - $a['required'] = (isset($attributes->data->required) && $attributes->data->required == 'true')? |
|
| 95 | - true: |
|
| 96 | - false; |
|
| 97 | - $a['class'] = isset($attributes->data->class)? $attributes->data->class : ''; |
|
| 98 | - $a['id'] = isset($attributes->data->id)? $attributes->data->id : ''; |
|
| 99 | - $a['lengthMin'] = isset($attributes->data->length)? $attributes->data->length->min : ''; |
|
| 100 | - $a['lengthMax'] = isset($attributes->data->length)? $attributes->data->length->max : ''; |
|
| 101 | - $a['validator'] = isset($attributes->data->validator)? $attributes->data->validator : ''; |
|
| 102 | - $a['innerData'] = isset($attributes->data->innerData)? $attributes->data->innerData : array(); |
|
| 103 | - $a['dropdownValues']= isset($attributes->data->dropdownValues)? |
|
| 104 | - $attributes->data->dropdownValues : |
|
| 105 | - array(); |
|
| 106 | - $a['filesizeMin'] = isset($attributes->data->filesize)? $attributes->data->filesize->min : 0; |
|
| 107 | - $a['filesizeMax'] = isset($attributes->data->filesize)? $attributes->data->filesize->max : 10*1024*1024; |
|
| 91 | + $a['name'] = isset($attributes->name) ? $attributes->name : ''; |
|
| 92 | + $a['placeholder'] = isset($attributes->data->placeholder) ? $attributes->data->placeholder : ''; |
|
| 93 | + $a['label'] = isset($attributes->data->label) ? $attributes->data->label : ''; |
|
| 94 | + $a['required'] = (isset($attributes->data->required) && $attributes->data->required == 'true') ? |
|
| 95 | + true : false; |
|
| 96 | + $a['class'] = isset($attributes->data->class) ? $attributes->data->class : ''; |
|
| 97 | + $a['id'] = isset($attributes->data->id) ? $attributes->data->id : ''; |
|
| 98 | + $a['lengthMin'] = isset($attributes->data->length) ? $attributes->data->length->min : ''; |
|
| 99 | + $a['lengthMax'] = isset($attributes->data->length) ? $attributes->data->length->max : ''; |
|
| 100 | + $a['validator'] = isset($attributes->data->validator) ? $attributes->data->validator : ''; |
|
| 101 | + $a['innerData'] = isset($attributes->data->innerData) ? $attributes->data->innerData : array(); |
|
| 102 | + $a['dropdownValues'] = isset($attributes->data->dropdownValues) ? |
|
| 103 | + $attributes->data->dropdownValues : array(); |
|
| 104 | + $a['filesizeMin'] = isset($attributes->data->filesize) ? $attributes->data->filesize->min : 0; |
|
| 105 | + $a['filesizeMax'] = isset($attributes->data->filesize) ? $attributes->data->filesize->max : 10*1024*1024; |
|
| 108 | 106 | |
| 109 | 107 | return $a; |
| 110 | 108 | } |
@@ -185,7 +183,7 @@ discard block |
||
| 185 | 183 | |
| 186 | 184 | foreach ($formPV as $element) { |
| 187 | 185 | if (isset($element->line_text)) { |
| 188 | - $attr = $this->getAttributes($element->line_text[0]); |
|
| 186 | + $attr = $this->getAttributes($element->line_text[0]); |
|
| 189 | 187 | $element = new Element\Text($attr['name']); |
| 190 | 188 | $element = $this->decorate($element, $attr, $inputFilter); |
| 191 | 189 | $form->add($element); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * setLocaleMapper |
| 44 | 44 | * @param LocaleMapper $localeMapper |
| 45 | 45 | * |
| 46 | - * @return PlaygroundCore\Entity\Locale Locale |
|
| 46 | + * @return Locale Locale |
|
| 47 | 47 | */ |
| 48 | 48 | public function setLocaleMapper($localeMapper) |
| 49 | 49 | { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * setOptions |
| 57 | 57 | * @param ModuleOptions $options |
| 58 | 58 | * |
| 59 | - * @return PlaygroundCore\Service\Locale $this |
|
| 59 | + * @return Locale $this |
|
| 60 | 60 | */ |
| 61 | 61 | public function setOptions(ModuleOptions $options) |
| 62 | 62 | { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * Set service manager instance |
| 94 | 94 | * |
| 95 | 95 | * @param ServiceManager $serviceManager |
| 96 | - * @return User |
|
| 96 | + * @return Locale |
|
| 97 | 97 | */ |
| 98 | 98 | public function setServiceManager(ServiceManager $serviceManager) |
| 99 | 99 | { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * setWebsiteMapper |
| 45 | 45 | * @param Mapper/Website $websiteMapper |
| 46 | 46 | * |
| 47 | - * @return PlaygroundCore\Entity\WebsiteMapper websiteMapper |
|
| 47 | + * @return Website websiteMapper |
|
| 48 | 48 | */ |
| 49 | 49 | public function setWebsiteMapper($websiteMapper) |
| 50 | 50 | { |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * setOptions |
| 58 | 58 | * @param ModuleOptions $options |
| 59 | 59 | * |
| 60 | - * @return PlaygroundCore\Service\Website $this |
|
| 60 | + * @return Website $this |
|
| 61 | 61 | */ |
| 62 | 62 | public function setOptions(ModuleOptions $options) |
| 63 | 63 | { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * Set service manager instance |
| 95 | 95 | * |
| 96 | 96 | * @param ServiceManager $serviceManager |
| 97 | - * @return User |
|
| 97 | + * @return Website |
|
| 98 | 98 | */ |
| 99 | 99 | public function setServiceManager(ServiceManager $serviceManager) |
| 100 | 100 | { |
@@ -41,7 +41,6 @@ |
||
| 41 | 41 | /** |
| 42 | 42 | * Sets the path to the blacklist file |
| 43 | 43 | * |
| 44 | - * @param string $path to the blacklist file |
|
| 45 | 44 | * @return Blacklist Provides a fluent interface |
| 46 | 45 | * @throws Exception\InvalidArgumentException When file is not found |
| 47 | 46 | */ |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | const FORBIDDEN = 'FORBIDDEN'; |
| 11 | 11 | |
| 12 | 12 | protected $options = array( |
| 13 | - 'file' => null, // File containing the blacklist file |
|
| 13 | + 'file' => null, // File containing the blacklist file |
|
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | 16 | protected $messageTemplates = array( |
@@ -20,9 +20,9 @@ discard block |
||
| 20 | 20 | public function __construct($options = null) |
| 21 | 21 | { |
| 22 | 22 | if (is_string($options)) { |
| 23 | - $this->options = array('file' => str_replace('\\', '/', getcwd()) . '/' . ltrim($options, '/')); |
|
| 23 | + $this->options = array('file' => str_replace('\\', '/', getcwd()).'/'.ltrim($options, '/')); |
|
| 24 | 24 | } elseif (is_array($options)) { |
| 25 | - $this->options = array('file' => str_replace('\\', '/', getcwd()) . $options[0]); |
|
| 25 | + $this->options = array('file' => str_replace('\\', '/', getcwd()).$options[0]); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | parent::__construct($options); |
@@ -36,7 +36,6 @@ |
||
| 36 | 36 | protected $request; |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | - * @param \Zend\View\Helper\HeadMeta $metaData |
|
| 40 | 39 | * @return \Zend\View\Helper\HeadMeta |
| 41 | 40 | */ |
| 42 | 41 | public function __invoke() |
@@ -4,4 +4,4 @@ |
||
| 4 | 4 | * It allows usage of this module even without composer. |
| 5 | 5 | * The original Module.php is in 'src/PlaygroundCore' in order to respect PSR-0 |
| 6 | 6 | */ |
| 7 | -require_once __DIR__ . '/src/PlaygroundCore/Module.php'; |
|
| 7 | +require_once __DIR__.'/src/PlaygroundCore/Module.php'; |
|
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -return function ($class) { |
|
| 2 | +return function($class) { |
|
| 3 | 3 | static $map; |
| 4 | - if (!$map) $map = include __DIR__ . '/autoload_classmap.php'; |
|
| 4 | + if (!$map) $map = include __DIR__.'/autoload_classmap.php'; |
|
| 5 | 5 | if (!isset($map[$class])) return false; |
| 6 | 6 | |
| 7 | 7 | return include $map[$class]; |
@@ -1,8 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | return function ($class) { |
| 3 | 3 | static $map; |
| 4 | - if (!$map) $map = include __DIR__ . '/autoload_classmap.php'; |
|
| 5 | - if (!isset($map[$class])) return false; |
|
| 4 | + if (!$map) { |
|
| 5 | + $map = include __DIR__ . '/autoload_classmap.php'; |
|
| 6 | + } |
|
| 7 | + if (!isset($map[$class])) { |
|
| 8 | + return false; |
|
| 9 | + } |
|
| 6 | 10 | |
| 7 | 11 | return include $map[$class]; |
| 8 | 12 | }; |
@@ -1,2 +1,2 @@ |
||
| 1 | 1 | <?php |
| 2 | -spl_autoload_register(include __DIR__ . '/autoload_function.php'); |
|
| 2 | +spl_autoload_register(include __DIR__.'/autoload_function.php'); |
|
@@ -1,10 +1,10 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | return array( |
| 3 | - 'service_manager' => array( |
|
| 4 | - 'factories' => array( |
|
| 5 | - 'translator' => 'Zend\Mvc\Service\TranslatorServiceFactory', |
|
| 6 | - ), |
|
| 7 | - ), |
|
| 3 | + 'service_manager' => array( |
|
| 4 | + 'factories' => array( |
|
| 5 | + 'translator' => 'Zend\Mvc\Service\TranslatorServiceFactory', |
|
| 6 | + ), |
|
| 7 | + ), |
|
| 8 | 8 | |
| 9 | 9 | 'doctrine' => array( |
| 10 | 10 | 'driver' => array( |
@@ -111,19 +111,19 @@ discard block |
||
| 111 | 111 | ), |
| 112 | 112 | ), |
| 113 | 113 | ), |
| 114 | - // Give the possibility to call Cron from browser |
|
| 115 | - 'cron' => array( |
|
| 116 | - 'type' => 'Literal', |
|
| 117 | - 'options' => array( |
|
| 118 | - 'route' => 'cron', |
|
| 119 | - 'defaults' => array( |
|
| 120 | - 'controller' => 'playgroundcore_console', |
|
| 121 | - 'action' => 'cron' |
|
| 122 | - ), |
|
| 123 | - ), |
|
| 124 | - ), |
|
| 125 | - ), |
|
| 126 | - ), |
|
| 114 | + // Give the possibility to call Cron from browser |
|
| 115 | + 'cron' => array( |
|
| 116 | + 'type' => 'Literal', |
|
| 117 | + 'options' => array( |
|
| 118 | + 'route' => 'cron', |
|
| 119 | + 'defaults' => array( |
|
| 120 | + 'controller' => 'playgroundcore_console', |
|
| 121 | + 'action' => 'cron' |
|
| 122 | + ), |
|
| 123 | + ), |
|
| 124 | + ), |
|
| 125 | + ), |
|
| 126 | + ), |
|
| 127 | 127 | 'admin' => array( |
| 128 | 128 | 'type' => 'Literal', |
| 129 | 129 | 'priority' => -1000, |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | 'list' => array( |
| 421 | 421 | 'type' => 'Segment', |
| 422 | 422 | 'options' => array( |
| 423 | - 'route' => '/list', |
|
| 423 | + 'route' => '/list', |
|
| 424 | 424 | 'defaults' => array( |
| 425 | 425 | 'controller' => 'PlaygroundCore\Controller\Admin\WebsiteAdmin', |
| 426 | 426 | 'action' => 'list', |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | 'edit-active' => array( |
| 432 | 432 | 'type' => 'Segment', |
| 433 | 433 | 'options' => array( |
| 434 | - 'route' => '/edit-active/[:websiteId]', |
|
| 434 | + 'route' => '/edit-active/[:websiteId]', |
|
| 435 | 435 | 'defaults' => array( |
| 436 | 436 | 'controller' => 'PlaygroundCore\Controller\Admin\WebsiteAdmin', |
| 437 | 437 | 'action' => 'editactive', |
@@ -504,6 +504,6 @@ discard block |
||
| 504 | 504 | 'validators' => array( |
| 505 | 505 | 'invokables' => array( |
| 506 | 506 | 'Special' => 'PlaygroundCore\Validator\Blacklist' |
| 507 | - ), |
|
| 507 | + ), |
|
| 508 | 508 | ), |
| 509 | 509 | ); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | 'playgroundcore_entity' => array( |
| 12 | 12 | 'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver', |
| 13 | 13 | 'cache' => 'array', |
| 14 | - 'paths' => __DIR__ . '/../src/PlaygroundCore/Entity' |
|
| 14 | + 'paths' => __DIR__.'/../src/PlaygroundCore/Entity' |
|
| 15 | 15 | ), |
| 16 | 16 | |
| 17 | 17 | 'orm_default' => array( |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | 'rule_providers' => array( |
| 54 | 54 | 'BjyAuthorize\Provider\Rule\Config' => array( |
| 55 | 55 | 'allow' => array( |
| 56 | - array(array('admin'), 'core', array('dashboard', 'edit')), |
|
| 56 | + array(array('admin'), 'core', array('dashboard', 'edit')), |
|
| 57 | 57 | ), |
| 58 | 58 | ), |
| 59 | 59 | ), |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | 'collections' => array( |
| 83 | 83 | 'core_flags' => array( |
| 84 | 84 | 'assets' => array( |
| 85 | - __DIR__ . '/../view/images/flag/*.png', |
|
| 85 | + __DIR__.'/../view/images/flag/*.png', |
|
| 86 | 86 | ), |
| 87 | 87 | 'options' => array( |
| 88 | 88 | 'move_raw' => true, |
@@ -515,25 +515,25 @@ discard block |
||
| 515 | 515 | 'translation_file_patterns' => array( |
| 516 | 516 | array( |
| 517 | 517 | 'type' => 'phpArray', |
| 518 | - 'base_dir' => __DIR__ . '/../../../../language', |
|
| 518 | + 'base_dir' => __DIR__.'/../../../../language', |
|
| 519 | 519 | 'pattern' => 'routes_%s.php', |
| 520 | 520 | 'text_domain' => 'routes' |
| 521 | 521 | ), |
| 522 | 522 | array( |
| 523 | 523 | 'type' => 'phpArray', |
| 524 | - 'base_dir' => __DIR__ . '/../language', |
|
| 524 | + 'base_dir' => __DIR__.'/../language', |
|
| 525 | 525 | 'pattern' => 'routes_%s.php', |
| 526 | 526 | 'text_domain' => 'routes' |
| 527 | 527 | ), |
| 528 | 528 | array( |
| 529 | 529 | 'type' => 'phpArray', |
| 530 | - 'base_dir' => __DIR__ . '/../../../../language', |
|
| 530 | + 'base_dir' => __DIR__.'/../../../../language', |
|
| 531 | 531 | 'pattern' => '%s.php', |
| 532 | 532 | 'text_domain' => 'playgroundcore' |
| 533 | 533 | ), |
| 534 | 534 | array( |
| 535 | 535 | 'type' => 'phpArray', |
| 536 | - 'base_dir' => __DIR__ . '/../language', |
|
| 536 | + 'base_dir' => __DIR__.'/../language', |
|
| 537 | 537 | 'pattern' => '%s.php', |
| 538 | 538 | 'text_domain' => 'playgroundcore' |
| 539 | 539 | ), |
@@ -542,8 +542,8 @@ discard block |
||
| 542 | 542 | |
| 543 | 543 | 'view_manager' => array( |
| 544 | 544 | 'template_path_stack' => array( |
| 545 | - __DIR__ . '/../view/admin', |
|
| 546 | - __DIR__ . '/../view/frontend', |
|
| 545 | + __DIR__.'/../view/admin', |
|
| 546 | + __DIR__.'/../view/frontend', |
|
| 547 | 547 | ), |
| 548 | 548 | ), |
| 549 | 549 | |