Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • CoreConfigRequirement
  • DatabaseForm
  • DatabaseOperation
  • DocumentDecorator
  • InstallForm
  • InstallOperation
  • InstallRequirements
  • LanguageElement
  • Operation
  • PanelDecorator
  • PanelForm
  • PDODriversRequirement
  • RepositoryRequirement
  • Requirement
  • Requirements
  • RequirementsOperation
  • SiteForm
  • SiteOperation
  • StepsController
  • TellMeMore
  • UserConfigRequirement
  • UserForm
  • UserOperation
  • WelcomePanel
  • WelcomeRequirements

Functions

  • t
 1 <?php
 2 
 3 /*
 4  * This file is part of the Icybee/Installer package.
 5  *
 6  * (c) Olivier Laviale <olivier.laviale@gmail.com>
 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 Icybee\Installer;
13 
14 use ICanBoogie\Errors;
15 
16 /**
17  * Requirements for the "user" configuration.
18  */
19 class UserConfigRequirement extends Requirement
20 {
21     public function __construct()
22     {
23         $this->title = t('requirement.user_config.title');
24         $this->description = t
25         (
26             'requirement.user_config.description', array
27             (
28                 'action' => new TellMeMore('user_config'),
29                 'data' => '<textarea class="span8" readonly="readonly">' . \ICanBoogie\escape($this->get_data()) . '</textarea>'
30             )
31         );
32     }
33 
34     public function __invoke(Errors $errors)
35     {
36         $pathname = WEBSITE_CONFIG_DIR . 'user.php';
37 
38         if (file_exists($pathname))
39         {
40             return;
41         }
42 
43         if (is_writable($pathname))
44         {
45             file_put_contents($pathname, $data);
46 
47             return;
48         }
49 
50         $errors['user_config'] = t('requirement.user_config.error.create', array('path' => \ICanBoogie\strip_root($pathname)));
51     }
52 
53     public function get_data()
54     {
55         $password_salt = \ICanboogie\generate_token_wide();
56 
57         return <<<EOT
58 <?php
59 
60 return array
61 (
62     'password_salt' => '$password_salt'
63 );
64 EOT;
65     }
66 }
Autodoc API documentation generated by ApiGen 2.8.0