├── .gitignore
├── .htaccess
├── .travis.yml
├── LICENSE.txt
├── README.md
├── composer-mouf.json
├── composer-mouf.lock
├── composer-mouf.sh
├── composer.json
├── composer.lock
├── composer.phar
├── doc
├── configuration_management.md
├── create_mouf_package.md
├── creating_php_classes_with_composer.md
├── declare_instance_via_php_code.md
├── dependency_injection.md
├── extending_mouf_ui.md
├── full_text_search.md
├── images
│ ├── arrow_down.png
│ ├── classes_analyze.png
│ ├── config_edit.png
│ ├── config_list.png
│ ├── config_popup.png
│ ├── config_validation.png
│ ├── create_instance.png
│ ├── create_instance_by_php_code.png
│ ├── create_instance_by_php_code_menu.png
│ ├── define_property_by_php_code.png
│ ├── define_property_by_php_code_menu.png
│ ├── enemy_instance.png
│ ├── hero_instance.png
│ ├── hero_instance_after_dragndrop.png
│ ├── hero_instance_dragndrop.png
│ ├── instance_logo.png
│ ├── instance_logo_custom.png
│ ├── instances_menu.png
│ ├── instances_tree.png
│ ├── logger_instance.png
│ ├── mailer_config_menu.png
│ ├── mailer_with_config_constant.png
│ ├── mouf_di_constructor.png
│ ├── mouf_di_public_properties.png
│ ├── mouf_di_setters.png
│ ├── node_instance_no_important.png
│ ├── node_instance_with_important.png
│ ├── property_array.png
│ ├── property_indexed_array.png
│ ├── property_multitype.png
│ ├── property_object.png
│ ├── property_primitive.png
│ ├── select_instance_popup.png
│ ├── several_kinds_of_objects.png
│ ├── special_action.png
│ ├── status-screen.png
│ ├── status_install.png
│ ├── troubleshooting_domain_name.png
│ ├── user_registration.png
│ ├── warrior_class_diagram.png
│ └── weakinstances.png
├── injection_techniques.md
├── install_process.md
├── installing_mouf.md
├── managing_instances_programmatically.md
├── mouf_annotations.md
├── mouf_di_ui.md
├── mouf_legacy_validators.md
├── supported_types.md
├── troubleshooting.md
├── troubleshooting_install.md
├── utility_functions.md
├── weak_instances.md
├── writing_mouf_validator.md
└── writing_packages_documentation.md
├── git-commit-packages.sh
├── git-recursive.sh
├── index.php
├── install_screen.php
├── mouf
├── Mouf.php
├── MoufComponents.php
└── MoufUI.php
├── phpunit.xml.dist
├── src-dev
├── Mouf
│ ├── Controllers
│ │ ├── AbstractMoufInstanceController.php
│ │ ├── Composer
│ │ │ └── InstalledPackagesController.php
│ │ ├── ConfigController.php
│ │ ├── DisplayPackageListInterface.php
│ │ ├── DocumentationController.php
│ │ ├── IncludesAnalyzerController.php
│ │ ├── InstallController.php
│ │ ├── MoufAjaxInstanceController.php
│ │ ├── MoufConfigureLocalUrlController.php
│ │ ├── MoufController.php
│ │ ├── MoufDisplayGraphController.php
│ │ ├── MoufInstallController.php
│ │ ├── MoufLoginController.php
│ │ ├── MoufRootController.php
│ │ ├── MoufValidatorController.php
│ │ ├── PhpInfoController.php
│ │ └── SearchController.php
│ ├── Installer
│ │ ├── AbstractInstallTask.php
│ │ ├── ClassInstallTask.php
│ │ ├── ComposerInstaller.php
│ │ ├── FileInstallTask.php
│ │ └── UrlInstallTask.php
│ ├── Menu
│ │ ├── ChooseInstanceMenuItem.php
│ │ └── DocumentationMenuItem.php
│ └── Validator
│ │ ├── MoufBasicValidationProvider.php
│ │ ├── MoufValidationProviderInterface.php
│ │ └── MoufValidatorService.php
└── views
│ ├── chooseInstancePopup.js
│ ├── codeCacheButton.php
│ ├── composer
│ ├── composer.js
│ ├── index.php
│ ├── install.php
│ └── uninstall.php
│ ├── configureLocalUrl.php
│ ├── connection-problem.php
│ ├── constants
│ ├── displayConstantsList.php
│ └── registerConstant.php
│ ├── displayNewInstance.php
│ ├── doc
│ └── index.php
│ ├── images
│ ├── MoufLogo.png
│ ├── ajax-loader.gif
│ ├── bullet_add.png
│ ├── bullet_wrench.png
│ ├── connection-problem.png
│ ├── cross.png
│ ├── database.png
│ ├── delete.png
│ ├── door_open.png
│ ├── download.png
│ ├── error.png
│ ├── folder_add.png
│ ├── note_edit.png
│ ├── package.png
│ ├── page_add.png
│ ├── page_white_copy.png
│ ├── page_white_php.png
│ ├── page_white_stack.png
│ ├── pencil.png
│ ├── report.png
│ ├── success.png
│ ├── table.png
│ ├── tick.png
│ ├── trash.png
│ ├── updown.png
│ ├── warn.png
│ ├── world_link.png
│ └── wrench.png
│ ├── includes
│ └── index.php
│ ├── install
│ ├── displaySteps.php
│ └── install.php
│ ├── installer
│ ├── installTasksList.php
│ └── processing.php
│ ├── instances
│ ├── codeValidator.js
│ ├── defaultRenderer.css
│ ├── defaultRenderer.js
│ ├── images
│ │ ├── add.png
│ │ ├── class.png
│ │ ├── disk.png
│ │ ├── inlinemenusprite.png
│ │ ├── tick.png
│ │ ├── trashcan_empty.png
│ │ └── trashcan_full.png
│ ├── instances.js
│ ├── jquery.scrollintoview.js
│ ├── messages.js
│ ├── moufui.js
│ ├── newInstance.php
│ ├── newInstanceByCallback.php
│ ├── saveManager.js
│ ├── setRootUrlBlock.php
│ ├── test.html
│ ├── utils.js
│ └── viewInstance.php
│ ├── javascript
│ ├── highlight.js
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── README.ru.md
│ │ ├── classref.txt
│ │ ├── highlight.pack.js
│ │ └── styles
│ │ │ ├── arta.css
│ │ │ ├── ascetic.css
│ │ │ ├── brown_paper.css
│ │ │ ├── brown_papersq.png
│ │ │ ├── dark.css
│ │ │ ├── default.css
│ │ │ ├── far.css
│ │ │ ├── github.css
│ │ │ ├── googlecode.css
│ │ │ ├── idea.css
│ │ │ ├── ir_black.css
│ │ │ ├── magula.css
│ │ │ ├── monokai.css
│ │ │ ├── pojoaque.css
│ │ │ ├── pojoaque.jpg
│ │ │ ├── rainbow.css
│ │ │ ├── school_book.css
│ │ │ ├── school_book.png
│ │ │ ├── solarized_dark.css
│ │ │ ├── solarized_light.css
│ │ │ ├── sunburst.css
│ │ │ ├── tomorrow-night-blue.css
│ │ │ ├── tomorrow-night-bright.css
│ │ │ ├── tomorrow-night-eighties.css
│ │ │ ├── tomorrow-night.css
│ │ │ ├── tomorrow.css
│ │ │ ├── vs.css
│ │ │ ├── xcode.css
│ │ │ └── zenburn.css
│ └── qtip
│ │ ├── jquery.qtip.css
│ │ ├── jquery.qtip.js
│ │ ├── jquery.qtip.min.css
│ │ └── jquery.qtip.min.js
│ ├── listComponents.php
│ ├── listComponentsByDirectory.php
│ ├── mouf_installer
│ ├── missing_curl.php
│ ├── missing_htaccess.php
│ ├── moufusers_exists.php
│ └── welcome.php
│ ├── search
│ ├── results.php
│ └── searchbox.php
│ ├── styles.css
│ ├── testview.php
│ └── validate.php
├── src
├── Mouf
│ ├── Actions
│ │ └── InstallUtils.php
│ ├── Annotations
│ │ ├── ExtendedActionAnnotation.php
│ │ ├── OneOfAnnotation.php
│ │ ├── OneOfTextAnnotation.php
│ │ ├── paramAnnotation.php
│ │ └── varAnnotation.php
│ ├── ClassNotFoundException.php
│ ├── ClassProxy.php
│ ├── CodeValidatorService.php
│ ├── Composer
│ │ ├── ChunckedUtils.php
│ │ ├── ClassMapGenerator.php
│ │ ├── ComposerService.php
│ │ ├── MoufComposerIO.php
│ │ ├── MoufJsComposerIO.php
│ │ └── OnPackageFoundInterface.php
│ ├── DocumentationUtils.php
│ ├── Installer
│ │ └── PackageInstallerInterface.php
│ ├── InstanceProxy.php
│ ├── MissingDependencyException.php
│ ├── MoufCache.php
│ ├── MoufClassExplorer.php
│ ├── MoufConfigManager.php
│ ├── MoufContainerException.php
│ ├── MoufException.php
│ ├── MoufGroupDescriptor.php
│ ├── MoufInstanceDescriptor.php
│ ├── MoufInstanceNotFoundException.php
│ ├── MoufInstancePropertyDescriptor.php
│ ├── MoufManager.php
│ ├── MoufNetworkException.php
│ ├── MoufPropertyDescriptor.php
│ ├── MoufSearchService.php
│ ├── MoufSearchable.php
│ ├── MoufTypeParserException.php
│ ├── MoufUtils.php
│ ├── Moufspector.php
│ ├── Reflection
│ │ ├── MoufAnnotationHelper.php
│ │ ├── MoufAnnotationInterface.php
│ │ ├── MoufPhpDocComment.php
│ │ ├── MoufReflectionClass.php
│ │ ├── MoufReflectionClassInterface.php
│ │ ├── MoufReflectionMethod.php
│ │ ├── MoufReflectionMethodInterface.php
│ │ ├── MoufReflectionParameter.php
│ │ ├── MoufReflectionParameterInterface.php
│ │ ├── MoufReflectionProperty.php
│ │ ├── MoufReflectionPropertyInterface.php
│ │ ├── MoufReflectionProxy.php
│ │ ├── MoufXmlReflectionClass.php
│ │ ├── MoufXmlReflectionMethod.php
│ │ ├── MoufXmlReflectionParameter.php
│ │ ├── MoufXmlReflectionProperty.php
│ │ ├── TypeDescriptor.php
│ │ └── TypesDescriptor.php
│ ├── UniqueIdService.php
│ └── Validator
│ │ ├── CheckConstructorLoopValidator.php
│ │ ├── InstancesClassValidator.php
│ │ └── SettingsValidator.php
├── direct
│ ├── analyze_includes.php
│ ├── analyze_includes_2.php
│ ├── config_complete_validator.php
│ ├── get_all_classes.php
│ ├── get_class.php
│ ├── get_class_map.php
│ ├── get_components_list.php
│ ├── get_defined_constants.php
│ ├── get_enhanced_components_list.php
│ ├── get_instance_details.php
│ ├── get_instances.php
│ ├── get_instances_with_details.php
│ ├── get_properties_for_class.php
│ ├── get_source_file.php
│ ├── get_validators_list.php
│ ├── install_file.php
│ ├── install_process_validator.php
│ ├── proxy.php
│ ├── purge_code_cache.php
│ ├── reset.php
│ ├── return_type_from_code.php
│ ├── run_install_class.php
│ ├── save_changes.php
│ ├── test_connection.php
│ ├── utils
│ │ └── check_rights.php
│ ├── validate.php
│ └── validate_code.php
├── install.php
├── load.php
├── mouf_router.php
├── splash.php
└── utils
│ ├── apply_MIT_license_header.php
│ ├── license_header.txt
│ └── license_header_2.txt
└── tests
├── Mouf
├── MoufManagerTest.php
├── MoufPropertyDescriptorTest.php
├── Reflection
│ ├── MoufReflectionClassTest.php
│ └── TypesDescriptorTest.php
└── TestClasses
│ ├── ClassWithErrors.php
│ ├── TestClass1.php
│ ├── TestClass2.php
│ ├── TestClassA.php
│ ├── TestClassWithAs.php
│ ├── TestClassWithClosureBeforeClass.php
│ └── TestSubClassA.php
└── bootstrap.php
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | vendor/*
3 | .*~
4 | config.php
5 | moufRunningActions.php
6 | .composer
7 |
--------------------------------------------------------------------------------
/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | RewriteEngine On
3 |
4 | # .htaccess RewriteBase related tips courtesy of Symfony 2's skeleton app.
5 |
6 | # Determine the RewriteBase automatically and set it as environment variable.
7 | # If you are using Apache aliases to do mass virtual hosting or installed the
8 | # project in a subdirectory, the base path will be prepended to allow proper
9 | # resolution of the base directory and to redirect to the correct URI. It will
10 | # work in environments without path prefix as well, providing a safe, one-size
11 | # fits all solution. But as you do not need it in this case, you can comment
12 | # the following 2 lines to eliminate the overhead.
13 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
14 | RewriteRule ^(.*) - [E=BASE:%1]
15 |
16 | RewriteRule doc\/view\/ %{ENV:BASE}/src/mouf_router.php
17 |
18 | # If the requested filename exists, and has an allowed extension, simply serve it.
19 | # We only want to let Apache serve files and not directories.
20 | #RewriteCond %{REQUEST_FILENAME} -f
21 | RewriteRule .*((\.(js|ico|gif|jpg|png|css)$)|^vendor|^src/direct/|^src/mouf_router.php) - [L]
22 |
23 | # Rewrite all other queries to the front controller.
24 | RewriteRule .? %{ENV:BASE}/src/mouf_router.php [L]
25 |
26 |
27 |
28 | # Use an error page as index file. It makes sure a proper error is displayed if
29 | # mod_rewrite is not available. Additionally, this reduces the matching process for the
30 | # start page (path "/") because otherwise Apache will apply the rewriting rules
31 | # to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
32 | DirectoryIndex vendor/mouf/mvc.splash/src/rewrite_missing.php
33 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | php:
4 | - 5.5
5 | - 5.6
6 |
7 | env:
8 | global:
9 | - COMPOSER=composer-mouf.json
10 |
11 | before_script:
12 | - composer install
13 |
14 | script:
15 | - ./vendor/bin/phpunit
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2008-2012 David Negrier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/composer-mouf.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "mouf/mouf-installer": "~2.0",
4 | "mouf/mouf-validators-interface": "~2.0",
5 | "mouf/html.template.mouftemplate": "~2.0",
6 | "mouf/html.template.bootstrap": "2.3.2.*",
7 | "mouf/utils.i18n.fine": "~3.0",
8 | "mouf/mvc.splash": "^4.3",
9 | "mouf/javascript.jquery.jquery-ui": "~1.10",
10 | "mouf/javascript.underscore": "~1.3.3",
11 | "mouf/utils.log.errorlog_logger": "~2.0",
12 | "mouf/javascript.jquery.jquery-filetree" : "~1.01.0",
13 | "mouf/javascript.syntaxhighlighter" : "~3.0.83",
14 | "mouf/html.widgets.menu" : "~2.0",
15 | "mouf/security.simplelogincontroller" : "~2.0",
16 | "mouf/security.userfiledao" : "~2.0",
17 | "mouf/utils.cache.file-cache" : "~2.0",
18 | "mouf/utils.common.getvars" : "^2.0",
19 | "mouf/famfamfam" : "~1.3.0",
20 | "mouf/html.template.menus.basicmenu" : "~2.0",
21 | "mouf/utils.session.session-manager" : "~2.0",
22 | "mouf/html.widgets.messageservice": "~2.0",
23 | "mouf/utils.cache.apc-cache": "~2.0",
24 | "michelf/php-markdown": "^1.9",
25 | "mouf/javascript.jquery.jq-bootstrap-validation": "~1.3.0",
26 | "container-interop/container-interop": "~1.0",
27 | "mouf/javascript.ace": "1.1.3",
28 | "nikic/php-parser": "~2.0",
29 | "mouf/security.userservice-splash": "~4.0",
30 | "mouf/classname-mapper": "~1.0"
31 | },
32 | "require-dev": {
33 | "phpunit/phpunit": "~4.0"
34 | },
35 | "autoload": {
36 | "psr-0": {"Mouf": ["src/", "src-dev/", "tests/"]}
37 | },
38 | "prefer-stable": true,
39 | "extra": {
40 | "mouf": {
41 |
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/composer-mouf.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # This runs the internal composer install for mouf (instead of the default composer.json file that is supposed to be used by other frameworks)
4 | COMPOSER=composer-mouf.json php composer.phar $@
5 |
--------------------------------------------------------------------------------
/composer.lock:
--------------------------------------------------------------------------------
1 | {
2 | "hash": "3620bfb732d0e04fddc744a081f50cd0",
3 | "packages": [
4 | {
5 | "name": "mouf/mouf-installer",
6 | "version": "2.0.x-dev",
7 | "source": {
8 | "type": "git",
9 | "url": "git@github.com:thecodingmachine/mouf-installer.git",
10 | "reference": "d518f9c3a91f0b67e6f04eb8b3c39a8a21e6ef58"
11 | },
12 | "dist": {
13 | "type": "zip",
14 | "url": "https://api.github.com/repos/thecodingmachine/mouf-installer/zipball/d518f9c3a91f0b67e6f04eb8b3c39a8a21e6ef58",
15 | "reference": "d518f9c3a91f0b67e6f04eb8b3c39a8a21e6ef58",
16 | "shasum": ""
17 | },
18 | "require": {
19 | "php": ">=5.3.0"
20 | },
21 | "time": "2013-02-05 10:46:25",
22 | "type": "composer-installer",
23 | "extra": {
24 | "class": [
25 | "Mouf\\Installer\\MoufLibraryInstaller",
26 | "Mouf\\Installer\\MoufFrameworkInstaller"
27 | ]
28 | },
29 | "autoload": {
30 | "psr-0": {
31 | "Mouf": "src/"
32 | }
33 | },
34 | "license": [
35 | "MIT"
36 | ],
37 | "authors": [
38 | {
39 | "name": "David Négrier",
40 | "email": "d.negrier@thecodingmachine.com",
41 | "homepage": "http://mouf-php.com"
42 | }
43 | ],
44 | "description": "The Mouf-installer package is a composer in charge of installing any package with the 'mouf-library' type.",
45 | "homepage": "http://mouf-php.com",
46 | "keywords": [
47 | "install",
48 | "mouf"
49 | ]
50 | }
51 | ],
52 | "packages-dev": null,
53 | "aliases": [
54 |
55 | ],
56 | "minimum-stability": "stable",
57 | "stability-flags": {
58 | "mouf/mouf-installer": 20
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/composer.phar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/composer.phar
--------------------------------------------------------------------------------
/doc/create_mouf_package.md:
--------------------------------------------------------------------------------
1 | #Create a Mouf2 Package
2 |
3 | ##Should I build a package?
4 |
5 | Before diving into the technical details packages declaration, we might want to ask what a package is and why we might want to build one.
6 | A package is a reusable set of classes. Therefore, you should build a package if you are developing a set of classes that you will be using later, in another project. There is no need to group your components in a package if they are specific to your web-application. If your classes are specific to your project, our advice would be to use Composer's autoloader mechanism to load your classes.
7 |
8 | ##Packages overview
9 |
10 | In Mouf2, packages are completely based on Composer. Therefore, in order to build a package, the first thing you might want to do is to learn how Composer packages are working.
11 | However, Mouf2 provides a special kind of Composer packages. You might want to use these special features if you want to set-up an installer for your package. You can setup graphical installers (web-based installers using the Mouf user interface), or silent installers (that usually create default instances based on your classes).
12 |
13 |
--------------------------------------------------------------------------------
/doc/images/arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/arrow_down.png
--------------------------------------------------------------------------------
/doc/images/classes_analyze.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/classes_analyze.png
--------------------------------------------------------------------------------
/doc/images/config_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/config_edit.png
--------------------------------------------------------------------------------
/doc/images/config_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/config_list.png
--------------------------------------------------------------------------------
/doc/images/config_popup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/config_popup.png
--------------------------------------------------------------------------------
/doc/images/config_validation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/config_validation.png
--------------------------------------------------------------------------------
/doc/images/create_instance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/create_instance.png
--------------------------------------------------------------------------------
/doc/images/create_instance_by_php_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/create_instance_by_php_code.png
--------------------------------------------------------------------------------
/doc/images/create_instance_by_php_code_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/create_instance_by_php_code_menu.png
--------------------------------------------------------------------------------
/doc/images/define_property_by_php_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/define_property_by_php_code.png
--------------------------------------------------------------------------------
/doc/images/define_property_by_php_code_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/define_property_by_php_code_menu.png
--------------------------------------------------------------------------------
/doc/images/enemy_instance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/enemy_instance.png
--------------------------------------------------------------------------------
/doc/images/hero_instance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/hero_instance.png
--------------------------------------------------------------------------------
/doc/images/hero_instance_after_dragndrop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/hero_instance_after_dragndrop.png
--------------------------------------------------------------------------------
/doc/images/hero_instance_dragndrop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/hero_instance_dragndrop.png
--------------------------------------------------------------------------------
/doc/images/instance_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/instance_logo.png
--------------------------------------------------------------------------------
/doc/images/instance_logo_custom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/instance_logo_custom.png
--------------------------------------------------------------------------------
/doc/images/instances_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/instances_menu.png
--------------------------------------------------------------------------------
/doc/images/instances_tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/instances_tree.png
--------------------------------------------------------------------------------
/doc/images/logger_instance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/logger_instance.png
--------------------------------------------------------------------------------
/doc/images/mailer_config_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/mailer_config_menu.png
--------------------------------------------------------------------------------
/doc/images/mailer_with_config_constant.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/mailer_with_config_constant.png
--------------------------------------------------------------------------------
/doc/images/mouf_di_constructor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/mouf_di_constructor.png
--------------------------------------------------------------------------------
/doc/images/mouf_di_public_properties.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/mouf_di_public_properties.png
--------------------------------------------------------------------------------
/doc/images/mouf_di_setters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/mouf_di_setters.png
--------------------------------------------------------------------------------
/doc/images/node_instance_no_important.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/node_instance_no_important.png
--------------------------------------------------------------------------------
/doc/images/node_instance_with_important.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/node_instance_with_important.png
--------------------------------------------------------------------------------
/doc/images/property_array.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/property_array.png
--------------------------------------------------------------------------------
/doc/images/property_indexed_array.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/property_indexed_array.png
--------------------------------------------------------------------------------
/doc/images/property_multitype.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/property_multitype.png
--------------------------------------------------------------------------------
/doc/images/property_object.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/property_object.png
--------------------------------------------------------------------------------
/doc/images/property_primitive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/property_primitive.png
--------------------------------------------------------------------------------
/doc/images/select_instance_popup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/select_instance_popup.png
--------------------------------------------------------------------------------
/doc/images/several_kinds_of_objects.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/several_kinds_of_objects.png
--------------------------------------------------------------------------------
/doc/images/special_action.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/special_action.png
--------------------------------------------------------------------------------
/doc/images/status-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/status-screen.png
--------------------------------------------------------------------------------
/doc/images/status_install.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/status_install.png
--------------------------------------------------------------------------------
/doc/images/troubleshooting_domain_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/troubleshooting_domain_name.png
--------------------------------------------------------------------------------
/doc/images/user_registration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/user_registration.png
--------------------------------------------------------------------------------
/doc/images/warrior_class_diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/warrior_class_diagram.png
--------------------------------------------------------------------------------
/doc/images/weakinstances.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/doc/images/weakinstances.png
--------------------------------------------------------------------------------
/doc/troubleshooting.md:
--------------------------------------------------------------------------------
1 | Troubleshooting guide
2 | =====================
3 |
4 | Developer's life is not a long and winding road. You will encounter bumps along the way and you
5 | need to have good tools to help you get away with your problems.
6 |
7 | Mouf does its fair share helping you pinpoint any problem or bug that might arise from your code.
8 |
9 | When facing a problem, here is the typical workflow you should follow:
10 |
11 | 1. Purge the **code cache** (green button) and the **cache** (red button)
12 | 2. Check Mouf's status page (menu **Project** > **Mouf status**) and try to solve any problem displayed
13 | 3. Still having a problem? Check the classes analyzis (menu **Project** > **Analyze classes**)
14 | This page displays the list of classes Mouf cannot load successfully, along a nice error message.
15 | It is common for Mouf to fail loading a number of classes. Check that the class you are working
16 | on is not one of them.
17 |
18 | 
19 |
20 |
Do not try to fix all problems in the classes analyzis page. This is not possible,
21 | in particular if you are using third pary packages. Instead, focus on your classes and make sure your classes
22 | have no errors.
23 |
24 | ###Still having a problem?
25 |
26 | If your problem is related to installing Mouf, or seems environment related, check the Troubleshooting
27 | installation guide >.
28 |
29 | If your problem is related to Mouf, Open an issue on Github >.
30 |
--------------------------------------------------------------------------------
/doc/utility_functions.md:
--------------------------------------------------------------------------------
1 | Utility functions
2 | =================
3 |
4 | When you write custom controllers for your package (extended actions or custom UI pages), you will often need
5 | to access your application's context. This is one of the main difficulties when you develop packages for Mouf.
6 | Mouf is loaded with all its classes, but you often need to trigger a function call in your application.
7 |
8 | For instance, you might want to modify a session variable in you application (but the session of your application
9 | is not shared with Mouf's session).
10 |
11 | Hopefully, Mouf comes with utility classes (proxies) that can help you to perform function calls in your application.
12 |
13 | Performing a static method call from Mouf context in your application context
14 | -----------------------------------------------------------------------------
15 |
16 | From a Mouf controller, you can call any static method of in the application side using the `ClassProxy` method.
17 |
18 | Using it is simple:
19 |
20 | ```php
21 | // The ClassProxy instance represents a class (fully qualified name passed in parameter)
22 | $proxy = new ClassProxy("Mouf\\Utils\\Cache\\Service\\PurgeCacheService");
23 | // The static method is called on the proxy instance
24 | $proxy->purgeAll();
25 | ```
26 |
27 | In the example above, we create a **proxy** to the *PurgeCacheService*. When we call the *purgeAll* method,
28 | the *PurgeCacheService::purgeAll* method is called. Please note this method must be **static**.
29 |
30 | You don't want to perform a static function call? You would prefer to call a regular method call? Read below!
31 |
32 | Performing a method call from Mouf context in one of your application instances
33 | -------------------------------------------------------------------------------
34 |
35 | You can also call directly a method of any instance declared in your application. Use the `InstanceProxy` to do this.
36 |
37 | Here is a sample:
38 |
39 | ```php
40 | // The InstanceProxy instance represents an instance
41 | $proxy = new InstanceProxy("myInstanceName");
42 | // You can call any method on this instance
43 | $result = $proxy->myMethod($myParam);
44 | ```
45 |
46 | Behind the scene, the InstanceProxy and the ClassProxy classes are performing CURL
47 | calls. This means that all the parameters you pass to the functions are serialized, and that the return value
48 | is also serialized. You can therefore pass primitive types easily (strings, arrays...) If you want to pass objects
49 | as parameters or as return values, the class must be available in your application and in Mouf's context.
--------------------------------------------------------------------------------
/doc/weak_instances.md:
--------------------------------------------------------------------------------
1 | Weak instances
2 | ==============
3 |
4 | What is a weak instance?
5 | ------------------------
6 |
7 | When developing with Mouf, you might end up creating a lot of instances.
8 | For instance, when developing a menu, you will have an instance for the menu, and an instance for each item of the menu.
9 |
10 | Now, let's imagine you want to delete a menu. The menu, along the menu-items represent an instances grape.
11 | You would have to delete the *menu* instance, and each menuitem, manually. This makes the task long, tedious and error-prone.
12 |
13 | This is where “weak” instances come into play. Weak instances can be automatically **garbage-collected** when
14 | no other instance references them. Using the menu example, the menu would be a “strong” object and the menu-items
15 | would be “weak” objects.
16 |
17 | 
18 |
19 | In this sample, we declared all MenuItems to be **weak** instances.
20 | Deleting the "Menu" instance will automatically destroy any "MenuItem" instance, because they would no more be
21 | connected to any "strong" instance. Also, deleting MenuItem 2 would automatically delete Menuitems 3 and 4.
22 |
23 | However, deleting the "Template" instance will not delete the "Menu" instance. "Strong" instances are not garbage collected.
24 |
25 | How do I declare a weak instance?
26 | ---------------------------------
27 |
28 | Currently, you cannot make an instance "weak" in the Mouf user interface.
29 | However, if you are a package developer, you can do it using the Mouf API:
30 |
31 | ```php
32 | // Make the "myInstance" a "weak" instance
33 | $moufManager->setInstanceWeakness('myInstance', true);
34 | ```
35 |
--------------------------------------------------------------------------------
/git-commit-packages.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | IFS="
4 | "
5 |
6 | olddir=`pwd`
7 | dir=
8 | for i in $( ls -1 vendor/mouf/); do
9 | cd $olddir/vendor/mouf/$i
10 |
11 | echo "Commiting/Pushing $i"
12 | git add *
13 | git commit -a -m $@
14 | git push
15 | done
16 |
17 | cd $olddir
18 |
--------------------------------------------------------------------------------
/git-recursive.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | IFS="
4 | "
5 |
6 | olddir=`pwd`
7 | dir=
8 | for i in $( ls -1 vendor/mouf/); do
9 | cd $olddir/vendor/mouf/$i
10 |
11 | echo "Running git $@ on $i"
12 | git $@
13 | done
14 |
15 | cd $olddir
16 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | define('ROOT_URL', $_SERVER["REQUEST_URI"]);
12 |
13 | require_once __DIR__.'/mouf/Mouf.php';
14 |
15 | MoufAdmin::getMoufInstallController()->htaccessNotDetected();
16 | exit;
17 | ?>
--------------------------------------------------------------------------------
/install_screen.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | //define('ROOT_URL', $_SERVER["REQUEST_URI"]);
12 |
13 | require_once __DIR__.'/mouf/Mouf.php';
14 |
15 | MoufAdmin::getMoufInstallController()->index();
16 | exit;
17 | ?>
--------------------------------------------------------------------------------
/mouf/MoufUI.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
16 | ./tests/Mouf/
17 |
18 |
19 |
20 |
21 | src
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src-dev/Mouf/Controllers/DisplayPackageListInterface.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Controllers;
11 |
12 | use Mouf\MoufPackage;
13 |
14 | use Mouf\Mvc\Splash\Controllers\Controller;
15 |
16 | /**
17 | * An interface implemented by controllers that can display a package list (using the displayGroup function).
18 | */
19 | interface DisplayPackageListInterface {
20 |
21 | /**
22 | * Display the rows of buttons below the package list.
23 | *
24 | * @param MoufPackage $package The package to display
25 | * @param string $enabledVersion The version of that package that is currently enabled, if any.
26 | */
27 | function displayPackageActions(MoufPackage $package, $enabledVersion);
28 | }
--------------------------------------------------------------------------------
/src-dev/Mouf/Controllers/MoufAjaxInstanceController.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Controllers;
11 |
12 | use Mouf\Html\HtmlElement\HtmlBlock;
13 |
14 | use Mouf\Mvc\Splash\Controllers\Controller;
15 | use Mouf\Html\Utils\WebLibraryManager\WebLibrary;
16 |
17 | /**
18 | * This controller displays the (not so) basic full ajax details page.
19 | */
20 | class MoufAjaxInstanceController extends AbstractMoufInstanceController {
21 |
22 | /**
23 | * @Property
24 | * @var HtmlBlock
25 | */
26 | public $rightBlock;
27 |
28 | /**
29 | * Displays the page to edit an instance.
30 | *
31 | * @Action
32 | * @Logged
33 | *
34 | * @param string $name the name of the component to display
35 | * @param string $selfedit If true, the name of the component must be a component from the Mouf framework itself (internal use only)
36 | */
37 | public function index($name, $selfedit = false) {
38 | $this->initController($name, $selfedit);
39 |
40 | $this->template->getWebLibraryManager()->addLibrary(new WebLibrary(["vendor/mouf/javascript.ace/src-min-noconflict/ace.js"]));
41 |
42 | $this->contentBlock->addFile(dirname(__FILE__)."/../../views/instances/viewInstance.php", $this);
43 | $this->rightBlock->addText("");
44 | $this->template->toHtml();
45 | }
46 | }
47 | ?>
--------------------------------------------------------------------------------
/src-dev/Mouf/Controllers/MoufConfigureLocalUrlController.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Controllers;
11 |
12 | use Mouf\Html\HtmlElement\HtmlBlock;
13 |
14 | use Mouf\MoufException;
15 | use Mouf\Mvc\Splash\Controllers\Controller;
16 | use Mouf\Reflection\MoufReflectionProxy;
17 |
18 | /**
19 | * The controller that will enable you to set up the local URL (if needed)
20 | */
21 | class MoufConfigureLocalUrlController extends Controller {
22 |
23 | /**
24 | * The template used by the main page for mouf.
25 | *
26 | * @Property
27 | * @Compulsory
28 | * @var TemplateInterface
29 | */
30 | public $template;
31 |
32 | /**
33 | * The content block the template will be writting into.
34 | *
35 | * @Property
36 | * @Compulsory
37 | * @var HtmlBlock
38 | */
39 | public $contentBlock;
40 |
41 | protected $status;
42 | protected $localUrl;
43 | protected $selfedit;
44 |
45 | /**
46 | * The default action will redirect to the MoufController defaultAction.
47 | *
48 | * @Action
49 | * @Logged
50 | */
51 | public function index($selfedit = "false") {
52 | $this->selfedit = $selfedit;
53 | $this->status = true;
54 |
55 | try {
56 | $this->status = MoufReflectionProxy::checkConnection();
57 | } catch (MoufException $e) {
58 | $this->status = false;
59 | }
60 |
61 | $this->localUrl = MoufReflectionProxy::getLocalUrlToProject();
62 |
63 | $this->contentBlock->addFile(ROOT_PATH."src-dev/views/configureLocalUrl.php", $this);
64 | $this->template->toHtml();
65 | }
66 |
67 | /**
68 | * @Action
69 | * @Logged
70 | */
71 | public function setLocalUrl($localUrl, $selfedit = "false") {
72 | $this->selfedit = $selfedit;
73 | MoufReflectionProxy::setLocalUrlToProject($localUrl);
74 | $this->index($selfedit);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src-dev/Mouf/Controllers/MoufLoginController.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Controllers;
11 |
12 | use Mouf\Mvc\Splash\Controllers\Controller;
13 | use Mouf\Security\Controllers\SimpleLoginController;
14 |
15 | /**
16 | * The MoufLoginController class provides the login page and login/logout mechanism for Mouf.
17 | * It is actually getting its behaviour from the SimpleLoginController with one simple addition:
18 | * if the MoufUsers.php file does not exist, it will guide the user towards a solution to be able to get logged.
19 | *
20 | * @Component
21 | */
22 | class MoufLoginController extends SimpleLoginController {
23 |
24 |
25 | /**
26 | * The index page will display the login form (from SimpleLoginController) or an explanation on how to setup users
27 | * if users are not set up yet.
28 | *
29 | * @Action
30 | * @param string $login The login to fill by default.
31 | * @param string $redirecturl The URL to redirect to when login is done. If not specified, the default login URL defined in the controller will be used instead.
32 | */
33 | public function defaultAction($login = null, $redirect = null) {
34 | /*if (!file_exists(ROOT_PATH."../../../mouf/MoufUsers.php")) {
35 | $this->contentBlock->addFile(dirname(__FILE__)."/../../views/missing_password_file.php", $this);
36 | $this->template->toHtml();
37 | return;
38 | }*/
39 |
40 | parent::defaultAction($login, $redirect);
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/src-dev/Mouf/Controllers/MoufRootController.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Controllers;
11 |
12 | use Mouf\Mvc\Splash\Controllers\Controller;
13 |
14 | /**
15 | * The base controller for Mouf (when the "mouf/" url is typed).
16 | *
17 | * @Component
18 | */
19 | class MoufRootController extends Controller {
20 |
21 | /**
22 | * The default action will redirect to the MoufController defaultAction.
23 | *
24 | * @URL /
25 | * @Logged
26 | */
27 | public function defaultAction() {
28 | header("Location: ".ROOT_URL."validate/");
29 | }
30 | }
31 | ?>
--------------------------------------------------------------------------------
/src-dev/Mouf/Controllers/MoufValidatorController.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Controllers;
11 |
12 | use Mouf\Html\HtmlElement\HtmlBlock;
13 |
14 | use Mouf\MoufException;
15 | use Mouf\Mvc\Splash\Controllers\Controller;
16 | use Mouf\Reflection\MoufReflectionProxy;
17 |
18 | /**
19 | * The controller that will call all validators on Mouf.
20 | *
21 | * @Component
22 | */
23 | class MoufValidatorController extends Controller {
24 |
25 | /**
26 | * The validation service.
27 | *
28 | * @Property
29 | * @Compulsory
30 | * @var MoufValidatorService
31 | */
32 | public $validatorService;
33 |
34 | /**
35 | * The template used by the main page for mouf.
36 | *
37 | * @Property
38 | * @Compulsory
39 | * @var TemplateInterface
40 | */
41 | public $template;
42 |
43 | /**
44 | * The content block the template will be writting into.
45 | *
46 | * @Property
47 | * @Compulsory
48 | * @var HtmlBlock
49 | */
50 | public $contentBlock;
51 |
52 | /**
53 | * The default action will redirect to the MoufController defaultAction.
54 | *
55 | * @Action
56 | * @Logged
57 | */
58 | public function defaultAction($selfedit = "false") {
59 | // Before running the other validation steps, we should make sure we can successfully cURL
60 | // into the server, from the server.
61 | try {
62 | if (!MoufReflectionProxy::checkConnection()) {
63 | $this->contentBlock->addFile(ROOT_PATH."src-dev/views/connection-problem.php", $this);
64 | $this->template->toHtml();
65 | return;
66 | }
67 | } catch (MoufException $e) {
68 | $this->contentBlock->addFile(ROOT_PATH."src-dev/views/connection-problem.php", $this);
69 | $this->template->toHtml();
70 | return;
71 | }
72 |
73 | $this->contentBlock->addFile(ROOT_PATH."src-dev/views/validate.php", $this);
74 | $this->template->toHtml();
75 | }
76 | }
77 | ?>
--------------------------------------------------------------------------------
/src-dev/Mouf/Controllers/PhpInfoController.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Controllers;
11 |
12 | use Mouf\Mvc\Splash\Controllers\Controller;
13 |
14 | /**
15 | * The controller displaying the PHP Info page.
16 | *
17 | * @Component
18 | */
19 | class PhpInfoController extends Controller {
20 |
21 | /**
22 | * Displays the PHP info page.
23 | *
24 | * @Action
25 | * @Logged
26 | */
27 | public function defaultAction() {
28 | echo phpinfo();
29 | }
30 | }
31 | ?>
--------------------------------------------------------------------------------
/src-dev/Mouf/Controllers/SearchController.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Controllers;
11 |
12 | use Mouf\MoufManager;
13 |
14 | use Mouf\Mvc\Splash\Controllers\Controller;
15 |
16 | /**
17 | * The controller managing full-text searches inside Mouf.
18 | *
19 | * @Component
20 | */
21 | class SearchController extends Controller {
22 |
23 | public $selfedit;
24 |
25 | /**
26 | * The active MoufManager to be edited/viewed
27 | *
28 | * @var MoufManager
29 | */
30 | public $moufManager;
31 |
32 | /**
33 | * The template used by the main page for mouf.
34 | *
35 | * @Property
36 | * @Compulsory
37 | * @var TemplateInterface
38 | */
39 | public $template;
40 |
41 | /**
42 | * The content block the template will be writting into.
43 | *
44 | * @Property
45 | * @Compulsory
46 | * @var HtmlBlock
47 | */
48 | public $contentBlock;
49 |
50 | /**
51 | * The search service references all the services that can searched in full-text.
52 | *
53 | * @Property
54 | * @Compulsory
55 | * @var MoufSearchService
56 | */
57 | public $searchService;
58 |
59 | protected $searchUrls;
60 | protected $query;
61 |
62 | /**
63 | * Performs a full-text search in Mouf.
64 | *
65 | * @Action
66 | * @Logged
67 | * @param string $query The text to search.
68 | * @param string $selfedit If true, the name of the component must be a component from the Mouf framework itself (internal use only)
69 | */
70 | public function defaultAction($query, $selfedit = "false") {
71 | $this->selfedit = $selfedit;
72 | $this->query = $query;
73 |
74 | /*if ($selfedit == "true") {*/
75 | $this->moufManager = MoufManager::getMoufManager();
76 | /*} else {
77 | $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
78 | }*/
79 |
80 | $this->searchUrls = array();
81 | foreach ($this->searchService->searchableServices as $service) {
82 | /* @var $service MoufSearchable */
83 | $this->searchUrls[] = array("name"=>$service->getSearchModuleName(), "url"=>ROOT_URL.$this->moufManager->findInstanceName($service)."/search");
84 | }
85 |
86 | $this->contentBlock->addFile(ROOT_PATH."src-dev/views/search/results.php", $this);
87 | $this->template->toHtml();
88 | }
89 |
90 | }
91 | ?>
--------------------------------------------------------------------------------
/src-dev/Mouf/Installer/ClassInstallTask.php:
--------------------------------------------------------------------------------
1 | className;
27 | }
28 |
29 | /**
30 | * Sets the className (relative to MOUF_URL) that will be called to run the install process.
31 | *
32 | * @param string $value
33 | */
34 | public function setClassName($value)
35 | {
36 | $this->className = $value;
37 | }
38 |
39 | /**
40 | * Returns an array representation of this object.
41 | * The array representation is used to store anything that can help reference the object + the status of the task.
42 | *
43 | * @return array
44 | */
45 | public function toArray() {
46 | return array(
47 | "status"=>$this->getStatus(),
48 | "type"=>"class",
49 | "class"=>$this->getClassName(),
50 | "package"=>$this->package->getName()
51 | );
52 | }
53 |
54 | /**
55 | * Returns true if the array passed in parameter (generated with "toArray"), matches this package.
56 | *
57 | * @param array $array
58 | * @return bool
59 | */
60 | public function matchesPackage(array $array) {
61 | if (isset($array['package']) && $array['package'] == $this->package->getName()
62 | && isset($array['class']) && $array['class'] == $this->getClassName()) {
63 | return true;
64 | } else {
65 | return false;
66 | }
67 | }
68 |
69 | /**
70 | * Returns the URL that can be used to install this package.
71 | *
72 | * @param bool $selfEdit
73 | * @return string
74 | */
75 | public function getRedirectUrl($selfEdit) {
76 | if ($selfEdit) {
77 | $rootUrl = ROOT_URL;
78 | } else {
79 | $rootUrl = ROOT_URL.'../../../';
80 | }
81 | return "src/direct/run_install_class.php?class=".urlencode($this->getClassName())."&selfedit=".($selfEdit?"true":"false")."&root_url=".urlencode($rootUrl)."&install_package=".$this->getPackage()->getName();
82 | }
83 | }
--------------------------------------------------------------------------------
/src-dev/Mouf/Installer/FileInstallTask.php:
--------------------------------------------------------------------------------
1 | file;
27 | }
28 |
29 | /**
30 | * Sets the PHP file (relative to package) that will be called to run the install process.
31 | *
32 | * @param string $value
33 | */
34 | public function setFile($value)
35 | {
36 | $this->file = $value;
37 | }
38 |
39 | /**
40 | * Returns an array representation of this object.
41 | * The array representation is used to store anything that can help reference the object + the status of the task.
42 | *
43 | * @return array
44 | */
45 | public function toArray() {
46 | return array(
47 | "status"=>$this->getStatus(),
48 | "type"=>"file",
49 | "file"=>$this->getFile(),
50 | "package"=>$this->package->getName()
51 | );
52 | }
53 |
54 | /**
55 | * Returns true if the array passed in parameter (generated with "toArray"), matches this package.
56 | *
57 | * @param array $array
58 | * @return bool
59 | */
60 | public function matchesPackage(array $array) {
61 | if (isset($array['package']) && $array['package'] == $this->package->getName()
62 | && isset($array['file']) && $array['file'] == $this->getFile()) {
63 | return true;
64 | } else {
65 | return false;
66 | }
67 | }
68 |
69 | /**
70 | * Returns the URL that can be used to install this package.
71 | *
72 | * @param bool $selfEdit
73 | * @return string
74 | */
75 | public function getRedirectUrl($selfEdit) {
76 | if ($selfEdit) {
77 | $rootUrl = ROOT_URL;
78 | } else {
79 | $rootUrl = ROOT_URL.'../../../';
80 | }
81 |
82 | return "src/direct/install_file.php?selfedit=".json_encode($selfEdit)."&root_url=".urlencode($rootUrl)."&install_package=".$this->getPackage()->getName()."&install_file=".$this->getFile();
83 | }
84 | }
--------------------------------------------------------------------------------
/src-dev/Mouf/Installer/UrlInstallTask.php:
--------------------------------------------------------------------------------
1 | url;
27 | }
28 |
29 | /**
30 | * Sets the url (relative to MOUF_URL) that will be called to run the install process.
31 | *
32 | * @param string $value
33 | */
34 | public function setUrl($value)
35 | {
36 | $this->url = $value;
37 | }
38 |
39 | /**
40 | * Returns an array representation of this object.
41 | * The array representation is used to store anything that can help reference the object + the status of the task.
42 | *
43 | * @return array
44 | */
45 | public function toArray() {
46 | return array(
47 | "status"=>$this->getStatus(),
48 | "type"=>"url",
49 | "url"=>$this->getUrl(),
50 | "package"=>$this->package->getName()
51 | );
52 | }
53 |
54 | /**
55 | * Returns true if the array passed in parameter (generated with "toArray"), matches this package.
56 | *
57 | * @param array $array
58 | * @return bool
59 | */
60 | public function matchesPackage(array $array) {
61 | if (isset($array['package']) && $array['package'] == $this->package->getName()
62 | && isset($array['url']) && $array['url'] == $this->getUrl()) {
63 | return true;
64 | } else {
65 | return false;
66 | }
67 | }
68 |
69 | /**
70 | * Returns the URL that can be used to install this package.
71 | *
72 | * @param bool $selfEdit
73 | * @return string
74 | */
75 | public function getRedirectUrl($selfEdit) {
76 | $url = $this->getUrl();
77 | if (strpos($url, "?") !== false) {
78 | $url .= "&selfedit=".($selfEdit?"true":"false");
79 | } else {
80 | $url .= "?selfedit=".($selfEdit?"true":"false");
81 | }
82 | return $url;
83 | }
84 | }
--------------------------------------------------------------------------------
/src-dev/Mouf/Menu/ChooseInstanceMenuItem.php:
--------------------------------------------------------------------------------
1 | $children
35 | */
36 | public function __construct($label=null, $url=null, $type=null) {
37 | parent::__construct($label, $url);
38 | $this->type = $type;
39 | }
40 |
41 | /**
42 | * Returns the URL for this menu. This URL is actually Javascript that will display the menu.
43 | * @return string
44 | */
45 | public function getLink() {
46 | $url = 'javascript:chooseInstancePopup('.json_encode($this->type).', "'.ROOT_URL.$this->getUrl().'?name=", "'.ROOT_URL.'")';
47 | return $url;
48 | }
49 |
50 | /**
51 | * Any instance selected will have to inherit or implement this type.
52 | * @param string $type
53 | */
54 | public function setType($type) {
55 | $this->type = $type;
56 | }
57 | }
58 | ?>
--------------------------------------------------------------------------------
/src-dev/Mouf/Validator/MoufValidationProviderInterface.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Validator;
11 |
12 | /**
13 | * A component extending the MoufValidationProviderInterface (and added to the MoufValidatorService) can be used
14 | * to run validation steps that will be displayed on Mouf validation screen (the front page).
15 | *
16 | * @author David
17 | */
18 | interface MoufValidationProviderInterface {
19 |
20 | /**
21 | * Returns the name of the validator.
22 | *
23 | * @return string
24 | */
25 | public function getName();
26 |
27 | /**
28 | * Returns the URL that will be called for that validator. The URL is relative to the ROOT_URL.
29 | * The URL will return a JSON object with this format:
30 | * {
31 | * code: "ok|warn|error",
32 | * html: "HTML code to be displayed on the Mouf validate screen"
33 | * }
34 | *
35 | * @return string
36 | */
37 | public function getUrl();
38 | }
39 |
40 | ?>
--------------------------------------------------------------------------------
/src-dev/views/codeCacheButton.php:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src-dev/views/composer/index.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /* @var $this Mouf\Controllers\Composer\InstalledPackagesController */
12 |
13 | use Mouf\Composer\PackageInterface;
14 | ?>
15 |
27 |
28 | Search packages
29 |
30 |
31 |
32 |
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
69 |
70 |
71 |
72 | Installed packages
73 |
74 | packageList as $package):
76 | /* @var $package PackageInterface */
77 | echo $this->getHtmlForPackage($package);
78 | ?>
79 |
--------------------------------------------------------------------------------
/src-dev/views/composer/install.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /* @var $this Mouf\Controllers\Composer\InstalledPackagesController */
12 |
13 | use Mouf\Composer\PackageInterface;
14 | ?>
15 | Installing name; ?> - version; ?>
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src-dev/views/composer/uninstall.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /* @var $this Mouf\Controllers\Composer\InstalledPackagesController */
12 |
13 | use Mouf\Composer\PackageInterface;
14 | ?>
15 | Uninstalling name; ?> - version; ?>
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src-dev/views/configureLocalUrl.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | ?>
12 | Configure local URL
13 |
14 | status) { ?>
15 | Local URL configuration is OK.
16 |
17 | Local URL configuration is KO. You need to configure it.
18 |
19 |
20 | What is this?
21 |
22 | For Mouf to work correctly, Mouf needs to be able to call itself from the server, via HTTP requests.
23 | If the URL to access Mouf from your browser cannot be directly called by the server Mouf is running on to access Mouf,
24 | then you need to provide this URL to Mouf.
25 |
26 |
27 |
28 |
29 |
30 | Configure local URL
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src-dev/views/connection-problem.php:
--------------------------------------------------------------------------------
1 |
2 | Mouf status
3 | A problem occured with your Mouf installation
4 |
5 | For Mouf to work correctly, Mouf needs to be able to call itself from the server, via HTTP requests.
6 |
7 |
8 |
9 |
10 |
11 | There is a problem with your installation of Mouf. You can successfully call Mouf from your browser,
12 | but Mouf cannot call itself from the server. This kind of errors does not usually
13 | happens when accessing Mouf on your localhost.
14 |
15 | Possible causes:
16 |
17 |
18 | - Port forwarding issues: If there is a port forwarding performed on the HTTP port, access to Mouf will fail.
19 | This is often the case if you are using Docker. In this case, you can use the
20 | Project > Configure local URL screen
21 | to point the server to the URL where is can access Mouf.
22 |
23 | - Load balancer issues: You are accessing Mouf on serveral remote hosts behind a load balancer. Using Mouf behind a load balancer is not supported.
24 | - DNS issues: There is a DNS problem and the server does not know its domain name. This can happen if you tweaked your
/etc/hosts
files
25 | or if you have special DNS settings. Here is a test you can do to check this:
26 |
27 | - Your webserver URL should be
. Open a terminal on your server,
28 | for instance using SSH.
29 | - On the server, run this command:
30 |
wget
31 |
32 | - The download should be successfull. If you have a look at the downloaded file (
cat test_connection.php
),
33 | the file should contain just the word "ok".
34 |
35 |
36 | - Authorization issues: If access to the Mouf URL requires some sort of authentication (apart from the
37 | standard Mouf authentication process), access to Mouf will fail. Here is a list of possible causes:
38 |
39 | - Your Apache configuration requires a Basic HTTP authentication.
40 | - You are using Mouf in a Cloud development environment (like Cloud9) and HTTP access
41 | to your virtual machine is closed (you are in private mode. In this case,
42 | opening you environment in public mode will solve the problem.
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src-dev/views/displayNewInstance.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | ?>
12 |
--------------------------------------------------------------------------------
/src-dev/views/doc/index.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | use Mouf\Composer\PackageInterface;
12 | ?>
13 | Documentation for installed packages
14 |
15 | packageList as $package):
19 | //var_export($package->getPrettyName());echo "
";
20 | //var_export($package->getExtra());echo "
";echo "
";
21 | /* @var $package PackageInterface */
22 | $docPages = $this->getDocPages($package);
23 | if ($docPages) {
24 | $extra = $package->getExtra();
25 | if (isset($extra['mouf']['logo'])) {
26 | $imgUrl = ROOT_URL.'../../'.$package->getName()."/".$extra['mouf']['logo'];
27 | } else {
28 | $imgUrl = ROOT_URL.'src-dev/views/images/package.png';
29 | }
30 |
31 | ?>
32 |
47 |
--------------------------------------------------------------------------------
/src-dev/views/images/MoufLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/MoufLogo.png
--------------------------------------------------------------------------------
/src-dev/views/images/ajax-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/ajax-loader.gif
--------------------------------------------------------------------------------
/src-dev/views/images/bullet_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/bullet_add.png
--------------------------------------------------------------------------------
/src-dev/views/images/bullet_wrench.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/bullet_wrench.png
--------------------------------------------------------------------------------
/src-dev/views/images/connection-problem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/connection-problem.png
--------------------------------------------------------------------------------
/src-dev/views/images/cross.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/cross.png
--------------------------------------------------------------------------------
/src-dev/views/images/database.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/database.png
--------------------------------------------------------------------------------
/src-dev/views/images/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/delete.png
--------------------------------------------------------------------------------
/src-dev/views/images/door_open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/door_open.png
--------------------------------------------------------------------------------
/src-dev/views/images/download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/download.png
--------------------------------------------------------------------------------
/src-dev/views/images/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/error.png
--------------------------------------------------------------------------------
/src-dev/views/images/folder_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/folder_add.png
--------------------------------------------------------------------------------
/src-dev/views/images/note_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/note_edit.png
--------------------------------------------------------------------------------
/src-dev/views/images/package.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/package.png
--------------------------------------------------------------------------------
/src-dev/views/images/page_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/page_add.png
--------------------------------------------------------------------------------
/src-dev/views/images/page_white_copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/page_white_copy.png
--------------------------------------------------------------------------------
/src-dev/views/images/page_white_php.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/page_white_php.png
--------------------------------------------------------------------------------
/src-dev/views/images/page_white_stack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/page_white_stack.png
--------------------------------------------------------------------------------
/src-dev/views/images/pencil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/pencil.png
--------------------------------------------------------------------------------
/src-dev/views/images/report.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/report.png
--------------------------------------------------------------------------------
/src-dev/views/images/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/success.png
--------------------------------------------------------------------------------
/src-dev/views/images/table.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/table.png
--------------------------------------------------------------------------------
/src-dev/views/images/tick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/tick.png
--------------------------------------------------------------------------------
/src-dev/views/images/trash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/trash.png
--------------------------------------------------------------------------------
/src-dev/views/images/updown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/updown.png
--------------------------------------------------------------------------------
/src-dev/views/images/warn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/warn.png
--------------------------------------------------------------------------------
/src-dev/views/images/world_link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/world_link.png
--------------------------------------------------------------------------------
/src-dev/views/images/wrench.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/images/wrench.png
--------------------------------------------------------------------------------
/src-dev/views/install/displaySteps.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /* @var $this Mouf\Actions\InstallController */
12 |
13 | foreach ($this->actionsList as $actionDescriptor) {
14 | /* @var $actionDescriptor MoufActionDescriptor */
15 | try {
16 | if ($actionDescriptor->status != "error") {
17 | echo "".$actionDescriptor->getName()."
";
18 | } else {
19 | echo "";
20 | echo "Error: ".$actionDescriptor->getName()."
";
21 | if ($this->exception != null) {
22 | UnhandledException($this->exception, true);
23 | }
24 | echo "
";
25 | }
26 | } catch (MoufInstanceNotFoundException $e) {
27 | // If we can't find the action provider, maybe it is not installed yet.
28 | // Let's just not display the name.
29 | echo "Install action provided by '".plainstring_to_htmlprotected($actionDescriptor->actionProviderName)."'...
";
30 | }
31 | }
32 |
33 | if ($this->done) {
34 | echo "".$this->multiStepActionService->getConfirmationMessage()."
";
35 | echo "Continue
";
36 | }
--------------------------------------------------------------------------------
/src-dev/views/install/install.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | ?>
11 | Installation in progress, please wait...
12 |
13 |
14 |
15 |
16 |
19 |
20 |
48 |
--------------------------------------------------------------------------------
/src-dev/views/installer/processing.php:
--------------------------------------------------------------------------------
1 | installs as $installTask) {
10 | if ($installTask->getStatus()==AbstractInstallTask::STATUS_TODO) {
11 | break;
12 | };
13 | $nextTodoPosition++;
14 | }
15 |
16 | $count = 0;
17 | ?>
18 | Processing installation
19 |
20 |
21 |
22 | Package |
23 | Description |
24 | Status |
25 |
26 | installs as $installTask):
27 | /* @var $installTask AbstractInstallTask */
28 | ?>
29 |
30 | getPackage()->getName()); ?> |
31 | getDescription()); ?> |
32 | ';
36 | }
37 |
38 | if ($installTask->getStatus()==AbstractInstallTask::STATUS_TODO) {
39 | echo ' Awaiting installation';
40 | } elseif ($installTask->getStatus()==AbstractInstallTask::STATUS_DONE) {
41 | echo ' Done';
42 | } else {
43 | echo plainstring_to_htmlprotected($installTask->getStatus());
44 | }
45 | ?>
46 | |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/src-dev/views/instances/codeValidator.js:
--------------------------------------------------------------------------------
1 | var CodeValidator;
2 |
3 | (function(){
4 | "use strict";
5 |
6 | /**
7 | * The CodeValidator class is in charge of validating PHP code and returing the
8 | * PHP class returned by the PHP code, or the error message returned.
9 | */
10 | CodeValidator = {
11 |
12 | /**
13 | * Validates the PHP code.
14 | * Returns a promise that returns the PHP type on success and the PHP error message on failure.
15 | */
16 | validate : function(code) {
17 | var promise = new Mouf.Promise();
18 |
19 | jQuery.ajax(MoufInstanceManager.rootUrl+"src/direct/return_type_from_code.php", {
20 | data: {
21 | code: code,
22 | encode: "json",
23 | selfedit: MoufInstanceManager.selfEdit?"true":"false"
24 | },
25 | type: 'POST'
26 | }).fail(function(e) {
27 | var msg = e;
28 | if (e.responseText) {
29 | msg = "Status code: "+e.status+" - "+e.statusText+"\n"+e.responseText;
30 | }
31 | promise.triggerError(window, msg);
32 | }).done(function(result) {
33 | if (typeof(result) == "string") {
34 | promise.triggerError(window, result);
35 | return;
36 | } else {
37 | promise.triggerSuccess(window, result["data"]["class"]?result["data"]["class"]:result["data"]["type"]);
38 | return;
39 | }
40 | });
41 | return promise;
42 | }
43 | }
44 |
45 | })();
--------------------------------------------------------------------------------
/src-dev/views/instances/images/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/instances/images/add.png
--------------------------------------------------------------------------------
/src-dev/views/instances/images/class.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/instances/images/class.png
--------------------------------------------------------------------------------
/src-dev/views/instances/images/disk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/instances/images/disk.png
--------------------------------------------------------------------------------
/src-dev/views/instances/images/inlinemenusprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/instances/images/inlinemenusprite.png
--------------------------------------------------------------------------------
/src-dev/views/instances/images/tick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/instances/images/tick.png
--------------------------------------------------------------------------------
/src-dev/views/instances/images/trashcan_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/instances/images/trashcan_empty.png
--------------------------------------------------------------------------------
/src-dev/views/instances/images/trashcan_full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/instances/images/trashcan_full.png
--------------------------------------------------------------------------------
/src-dev/views/instances/messages.js:
--------------------------------------------------------------------------------
1 |
2 | function addMessage(msg, cssClass) {
3 | if (jQuery("#messages").size() == 0) {
4 | jQuery("").attr("id", "messages").prependTo(jQuery('#content'));
5 | }
6 |
7 | jQuery("#messages").append(""+msg+"
");
8 | }
--------------------------------------------------------------------------------
/src-dev/views/instances/newInstanceByCallback.php:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
28 |
29 |
30 |
31 |
32 | Although it is usually a better idea to declare an instance using the
web based UI,
33 | it is not always possible to use the UI to instanciate all classes.
34 |
35 |
36 | - Sometimes, a third-party package will force you to use a factory to create
37 | an instance.
38 | - Sometimes, the annotations in the class are not good enough for Mouf to provide
39 | a helpful UI.
40 | - Sometimes, you want to inject a value that is computed using complex code...
41 |
42 |
43 | For all those cases, you can use the
instance declaration via PHP code.
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src-dev/views/instances/setRootUrlBlock.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src-dev/views/instances/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
19 |
--------------------------------------------------------------------------------
/src-dev/views/instances/viewInstance.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE.txt
9 | * file that was distributed with this source code.
10 | */
11 |
12 | /* @var $this MoufAjaxInstanceController */
13 |
14 | ?>
15 |
16 |
17 |
18 |
33 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2006, Ivan Sagalaev
2 | All rights reserved.
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are met:
5 |
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of highlight.js nor the names of its contributors
12 | may be used to endorse or promote products derived from this software
13 | without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/ascetic.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev
4 |
5 | */
6 |
7 | pre code {
8 | display: block; padding: 0.5em;
9 | background: white; color: black;
10 | }
11 |
12 | pre .string,
13 | pre .tag .value,
14 | pre .filter .argument,
15 | pre .addition,
16 | pre .change,
17 | pre .apache .tag,
18 | pre .apache .cbracket,
19 | pre .nginx .built_in,
20 | pre .tex .formula {
21 | color: #888;
22 | }
23 |
24 | pre .comment,
25 | pre .template_comment,
26 | pre .shebang,
27 | pre .doctype,
28 | pre .pi,
29 | pre .javadoc,
30 | pre .deletion,
31 | pre .apache .sqbracket {
32 | color: #CCC;
33 | }
34 |
35 | pre .keyword,
36 | pre .tag .title,
37 | pre .ini .title,
38 | pre .lisp .title,
39 | pre .clojure .title,
40 | pre .http .title,
41 | pre .nginx .title,
42 | pre .css .tag,
43 | pre .winutils,
44 | pre .flow,
45 | pre .apache .tag,
46 | pre .tex .command,
47 | pre .request,
48 | pre .status {
49 | font-weight: bold;
50 | }
51 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/brown_paper.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura
4 |
5 | */
6 |
7 | pre code {
8 | display: block; padding: 0.5em;
9 | background:#b7a68e url(./brown_papersq.png);
10 | }
11 |
12 | pre .keyword,
13 | pre .literal,
14 | pre .change,
15 | pre .winutils,
16 | pre .flow,
17 | pre .lisp .title,
18 | pre .clojure .built_in,
19 | pre .nginx .title,
20 | pre .tex .special,
21 | pre .request,
22 | pre .status {
23 | color:#005599;
24 | font-weight:bold;
25 | }
26 |
27 | pre code,
28 | pre .subst,
29 | pre .tag .keyword {
30 | color: #363C69;
31 | }
32 |
33 | pre .string,
34 | pre .title,
35 | pre .haskell .type,
36 | pre .tag .value,
37 | pre .css .rules .value,
38 | pre .preprocessor,
39 | pre .ruby .symbol,
40 | pre .ruby .symbol .string,
41 | pre .ruby .class .parent,
42 | pre .built_in,
43 | pre .sql .aggregate,
44 | pre .django .template_tag,
45 | pre .django .variable,
46 | pre .smalltalk .class,
47 | pre .javadoc,
48 | pre .ruby .string,
49 | pre .django .filter .argument,
50 | pre .smalltalk .localvars,
51 | pre .smalltalk .array,
52 | pre .attr_selector,
53 | pre .pseudo,
54 | pre .addition,
55 | pre .stream,
56 | pre .envvar,
57 | pre .apache .tag,
58 | pre .apache .cbracket,
59 | pre .tex .number {
60 | color: #2C009F;
61 | }
62 |
63 | pre .comment,
64 | pre .java .annotation,
65 | pre .python .decorator,
66 | pre .template_comment,
67 | pre .pi,
68 | pre .doctype,
69 | pre .deletion,
70 | pre .shebang,
71 | pre .apache .sqbracket,
72 | pre .nginx .built_in,
73 | pre .tex .formula {
74 | color: #802022;
75 | }
76 |
77 | pre .keyword,
78 | pre .literal,
79 | pre .css .id,
80 | pre .phpdoc,
81 | pre .title,
82 | pre .haskell .type,
83 | pre .vbscript .built_in,
84 | pre .sql .aggregate,
85 | pre .rsl .built_in,
86 | pre .smalltalk .class,
87 | pre .diff .header,
88 | pre .chunk,
89 | pre .winutils,
90 | pre .bash .variable,
91 | pre .apache .tag,
92 | pre .tex .command {
93 | font-weight: bold;
94 | }
95 |
96 | pre .coffeescript .javascript,
97 | pre .javascript .xml,
98 | pre .tex .formula,
99 | pre .xml .javascript,
100 | pre .xml .vbscript,
101 | pre .xml .css,
102 | pre .xml .cdata {
103 | opacity: 0.8;
104 | }
105 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/brown_papersq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/javascript/highlight.js/styles/brown_papersq.png
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/dark.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev
4 |
5 | */
6 |
7 | pre code {
8 | display: block; padding: 0.5em;
9 | background: #444;
10 | }
11 |
12 | pre .keyword,
13 | pre .literal,
14 | pre .change,
15 | pre .winutils,
16 | pre .flow,
17 | pre .lisp .title,
18 | pre .clojure .built_in,
19 | pre .nginx .title,
20 | pre .tex .special {
21 | color: white;
22 | }
23 |
24 | pre code,
25 | pre .subst {
26 | color: #DDD;
27 | }
28 |
29 | pre .string,
30 | pre .title,
31 | pre .haskell .type,
32 | pre .ini .title,
33 | pre .tag .value,
34 | pre .css .rules .value,
35 | pre .preprocessor,
36 | pre .ruby .symbol,
37 | pre .ruby .symbol .string,
38 | pre .ruby .class .parent,
39 | pre .built_in,
40 | pre .sql .aggregate,
41 | pre .django .template_tag,
42 | pre .django .variable,
43 | pre .smalltalk .class,
44 | pre .javadoc,
45 | pre .ruby .string,
46 | pre .django .filter .argument,
47 | pre .smalltalk .localvars,
48 | pre .smalltalk .array,
49 | pre .attr_selector,
50 | pre .pseudo,
51 | pre .addition,
52 | pre .stream,
53 | pre .envvar,
54 | pre .apache .tag,
55 | pre .apache .cbracket,
56 | pre .tex .command,
57 | pre .prompt {
58 | color: #D88;
59 | }
60 |
61 | pre .comment,
62 | pre .java .annotation,
63 | pre .python .decorator,
64 | pre .template_comment,
65 | pre .pi,
66 | pre .doctype,
67 | pre .deletion,
68 | pre .shebang,
69 | pre .apache .sqbracket,
70 | pre .tex .formula {
71 | color: #777;
72 | }
73 |
74 | pre .keyword,
75 | pre .literal,
76 | pre .title,
77 | pre .css .id,
78 | pre .phpdoc,
79 | pre .haskell .type,
80 | pre .vbscript .built_in,
81 | pre .sql .aggregate,
82 | pre .rsl .built_in,
83 | pre .smalltalk .class,
84 | pre .diff .header,
85 | pre .chunk,
86 | pre .winutils,
87 | pre .bash .variable,
88 | pre .apache .tag,
89 | pre .tex .special,
90 | pre .request,
91 | pre .status {
92 | font-weight: bold;
93 | }
94 |
95 | pre .coffeescript .javascript,
96 | pre .javascript .xml,
97 | pre .tex .formula,
98 | pre .xml .javascript,
99 | pre .xml .vbscript,
100 | pre .xml .css,
101 | pre .xml .cdata {
102 | opacity: 0.5;
103 | }
104 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/far.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | FAR Style (c) MajestiC
4 |
5 | */
6 |
7 | pre code {
8 | display: block; padding: 0.5em;
9 | background: #000080;
10 | }
11 |
12 | pre code,
13 | pre .subst {
14 | color: #0FF;
15 | }
16 |
17 | pre .string,
18 | pre .ruby .string,
19 | pre .haskell .type,
20 | pre .tag .value,
21 | pre .css .rules .value,
22 | pre .css .rules .value .number,
23 | pre .preprocessor,
24 | pre .ruby .symbol,
25 | pre .ruby .symbol .string,
26 | pre .built_in,
27 | pre .sql .aggregate,
28 | pre .django .template_tag,
29 | pre .django .variable,
30 | pre .smalltalk .class,
31 | pre .addition,
32 | pre .apache .tag,
33 | pre .apache .cbracket,
34 | pre .tex .command,
35 | pre .clojure .title {
36 | color: #FF0;
37 | }
38 |
39 | pre .keyword,
40 | pre .css .id,
41 | pre .title,
42 | pre .haskell .type,
43 | pre .vbscript .built_in,
44 | pre .sql .aggregate,
45 | pre .rsl .built_in,
46 | pre .smalltalk .class,
47 | pre .xml .tag .title,
48 | pre .winutils,
49 | pre .flow,
50 | pre .change,
51 | pre .envvar,
52 | pre .bash .variable,
53 | pre .tex .special,
54 | pre .clojure .built_in {
55 | color: #FFF;
56 | }
57 |
58 | pre .comment,
59 | pre .phpdoc,
60 | pre .javadoc,
61 | pre .java .annotation,
62 | pre .template_comment,
63 | pre .deletion,
64 | pre .apache .sqbracket,
65 | pre .tex .formula {
66 | color: #888;
67 | }
68 |
69 | pre .number,
70 | pre .date,
71 | pre .regexp,
72 | pre .literal,
73 | pre .smalltalk .symbol,
74 | pre .smalltalk .char,
75 | pre .clojure .attribute {
76 | color: #0F0;
77 | }
78 |
79 | pre .python .decorator,
80 | pre .django .filter .argument,
81 | pre .smalltalk .localvars,
82 | pre .smalltalk .array,
83 | pre .attr_selector,
84 | pre .pseudo,
85 | pre .xml .pi,
86 | pre .diff .header,
87 | pre .chunk,
88 | pre .shebang,
89 | pre .nginx .built_in,
90 | pre .prompt {
91 | color: #008080;
92 | }
93 |
94 | pre .keyword,
95 | pre .css .id,
96 | pre .title,
97 | pre .haskell .type,
98 | pre .vbscript .built_in,
99 | pre .sql .aggregate,
100 | pre .rsl .built_in,
101 | pre .smalltalk .class,
102 | pre .winutils,
103 | pre .flow,
104 | pre .apache .tag,
105 | pre .nginx .built_in,
106 | pre .tex .command,
107 | pre .tex .special,
108 | pre .request,
109 | pre .status {
110 | font-weight: bold;
111 | }
112 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/github.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | github.com style (c) Vasily Polovnyov
4 |
5 | */
6 |
7 | pre code {
8 | display: block; padding: 0.5em;
9 | color: #333;
10 | background: #f8f8ff
11 | }
12 |
13 | pre .comment,
14 | pre .template_comment,
15 | pre .diff .header,
16 | pre .javadoc {
17 | color: #998;
18 | font-style: italic
19 | }
20 |
21 | pre .keyword,
22 | pre .css .rule .keyword,
23 | pre .winutils,
24 | pre .javascript .title,
25 | pre .nginx .title,
26 | pre .subst,
27 | pre .request,
28 | pre .status {
29 | color: #333;
30 | font-weight: bold
31 | }
32 |
33 | pre .number,
34 | pre .hexcolor,
35 | pre .ruby .constant {
36 | color: #099;
37 | }
38 |
39 | pre .string,
40 | pre .tag .value,
41 | pre .phpdoc,
42 | pre .tex .formula {
43 | color: #d14
44 | }
45 |
46 | pre .title,
47 | pre .id {
48 | color: #900;
49 | font-weight: bold
50 | }
51 |
52 | pre .javascript .title,
53 | pre .lisp .title,
54 | pre .clojure .title,
55 | pre .subst {
56 | font-weight: normal
57 | }
58 |
59 | pre .class .title,
60 | pre .haskell .type,
61 | pre .vhdl .literal,
62 | pre .tex .command {
63 | color: #458;
64 | font-weight: bold
65 | }
66 |
67 | pre .tag,
68 | pre .tag .title,
69 | pre .rules .property,
70 | pre .django .tag .keyword {
71 | color: #000080;
72 | font-weight: normal
73 | }
74 |
75 | pre .attribute,
76 | pre .variable,
77 | pre .lisp .body {
78 | color: #008080
79 | }
80 |
81 | pre .regexp {
82 | color: #009926
83 | }
84 |
85 | pre .class {
86 | color: #458;
87 | font-weight: bold
88 | }
89 |
90 | pre .symbol,
91 | pre .ruby .symbol .string,
92 | pre .lisp .keyword,
93 | pre .tex .special,
94 | pre .prompt {
95 | color: #990073
96 | }
97 |
98 | pre .built_in,
99 | pre .lisp .title,
100 | pre .clojure .built_in {
101 | color: #0086b3
102 | }
103 |
104 | pre .preprocessor,
105 | pre .pi,
106 | pre .doctype,
107 | pre .shebang,
108 | pre .cdata {
109 | color: #999;
110 | font-weight: bold
111 | }
112 |
113 | pre .deletion {
114 | background: #fdd
115 | }
116 |
117 | pre .addition {
118 | background: #dfd
119 | }
120 |
121 | pre .diff .change {
122 | background: #0086b3
123 | }
124 |
125 | pre .chunk {
126 | color: #aaa
127 | }
128 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/idea.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Intellij Idea-like styling (c) Vasily Polovnyov
4 |
5 | */
6 |
7 | pre code {
8 | display: block; padding: 0.5em;
9 | color: #000;
10 | background: #fff;
11 | }
12 |
13 | pre .subst,
14 | pre .title {
15 | font-weight: normal;
16 | color: #000;
17 | }
18 |
19 | pre .comment,
20 | pre .template_comment,
21 | pre .javadoc,
22 | pre .diff .header {
23 | color: #808080;
24 | font-style: italic;
25 | }
26 |
27 | pre .annotation,
28 | pre .decorator,
29 | pre .preprocessor,
30 | pre .doctype,
31 | pre .pi,
32 | pre .chunk,
33 | pre .shebang,
34 | pre .apache .cbracket,
35 | pre .prompt,
36 | pre .http .title {
37 | color: #808000;
38 | }
39 |
40 | pre .tag,
41 | pre .pi {
42 | background: #efefef;
43 | }
44 |
45 | pre .tag .title,
46 | pre .id,
47 | pre .attr_selector,
48 | pre .pseudo,
49 | pre .literal,
50 | pre .keyword,
51 | pre .hexcolor,
52 | pre .css .function,
53 | pre .ini .title,
54 | pre .css .class,
55 | pre .list .title,
56 | pre .clojure .title,
57 | pre .nginx .title,
58 | pre .tex .command,
59 | pre .request,
60 | pre .status {
61 | font-weight: bold;
62 | color: #000080;
63 | }
64 |
65 | pre .attribute,
66 | pre .rules .keyword,
67 | pre .number,
68 | pre .date,
69 | pre .regexp,
70 | pre .tex .special {
71 | font-weight: bold;
72 | color: #0000ff;
73 | }
74 |
75 | pre .number,
76 | pre .regexp {
77 | font-weight: normal;
78 | }
79 |
80 | pre .string,
81 | pre .value,
82 | pre .filter .argument,
83 | pre .css .function .params,
84 | pre .apache .tag {
85 | color: #008000;
86 | font-weight: bold;
87 | }
88 |
89 | pre .symbol,
90 | pre .ruby .symbol .string,
91 | pre .char,
92 | pre .tex .formula {
93 | color: #000;
94 | background: #d0eded;
95 | font-style: italic;
96 | }
97 |
98 | pre .phpdoc,
99 | pre .yardoctag,
100 | pre .javadoctag {
101 | text-decoration: underline;
102 | }
103 |
104 | pre .variable,
105 | pre .envvar,
106 | pre .apache .sqbracket,
107 | pre .nginx .built_in {
108 | color: #660e7a;
109 | }
110 |
111 | pre .addition {
112 | background: #baeeba;
113 | }
114 |
115 | pre .deletion {
116 | background: #ffc8bd;
117 | }
118 |
119 | pre .diff .change {
120 | background: #bccff9;
121 | }
122 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/ir_black.css:
--------------------------------------------------------------------------------
1 | /*
2 | IR_Black style (c) Vasily Mikhailitchenko
3 | */
4 |
5 | pre code {
6 | display: block; padding: 0.5em;
7 | background: #000; color: #f8f8f8;
8 | }
9 |
10 | pre .shebang,
11 | pre .comment,
12 | pre .template_comment,
13 | pre .javadoc {
14 | color: #7c7c7c;
15 | }
16 |
17 | pre .keyword,
18 | pre .tag,
19 | pre .tex .command,
20 | pre .request,
21 | pre .status,
22 | pre .clojure .attribute {
23 | color: #96CBFE;
24 | }
25 |
26 | pre .sub .keyword,
27 | pre .method,
28 | pre .list .title,
29 | pre .nginx .title {
30 | color: #FFFFB6;
31 | }
32 |
33 | pre .string,
34 | pre .tag .value,
35 | pre .cdata,
36 | pre .filter .argument,
37 | pre .attr_selector,
38 | pre .apache .cbracket,
39 | pre .date {
40 | color: #A8FF60;
41 | }
42 |
43 | pre .subst {
44 | color: #DAEFA3;
45 | }
46 |
47 | pre .regexp {
48 | color: #E9C062;
49 | }
50 |
51 | pre .title,
52 | pre .sub .identifier,
53 | pre .pi,
54 | pre .decorator,
55 | pre .tex .special,
56 | pre .haskell .type,
57 | pre .constant,
58 | pre .smalltalk .class,
59 | pre .javadoctag,
60 | pre .yardoctag,
61 | pre .phpdoc,
62 | pre .nginx .built_in {
63 | color: #FFFFB6;
64 | }
65 |
66 | pre .symbol,
67 | pre .ruby .symbol .string,
68 | pre .number,
69 | pre .variable,
70 | pre .vbscript,
71 | pre .literal {
72 | color: #C6C5FE;
73 | }
74 |
75 | pre .css .tag {
76 | color: #96CBFE;
77 | }
78 |
79 | pre .css .rules .property,
80 | pre .css .id {
81 | color: #FFFFB6;
82 | }
83 |
84 | pre .css .class {
85 | color: #FFF;
86 | }
87 |
88 | pre .hexcolor {
89 | color: #C6C5FE;
90 | }
91 |
92 | pre .number {
93 | color:#FF73FD;
94 | }
95 |
96 | pre .coffeescript .javascript,
97 | pre .javascript .xml,
98 | pre .tex .formula,
99 | pre .xml .javascript,
100 | pre .xml .vbscript,
101 | pre .xml .css,
102 | pre .xml .cdata {
103 | opacity: 0.7;
104 | }
105 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/magula.css:
--------------------------------------------------------------------------------
1 | /*
2 | Description: Magula style for highligh.js
3 | Author: Ruslan Keba
4 | Website: http://rukeba.com/
5 | Version: 1.0
6 | Date: 2009-01-03
7 | Music: Aphex Twin / Xtal
8 | */
9 |
10 | pre code {
11 | display: block; padding: 0.5em;
12 | background-color: #f4f4f4;
13 | }
14 |
15 | pre code,
16 | pre .subst,
17 | pre .lisp .title,
18 | pre .clojure .built_in {
19 | color: black;
20 | }
21 |
22 | pre .string,
23 | pre .title,
24 | pre .parent,
25 | pre .tag .value,
26 | pre .rules .value,
27 | pre .rules .value .number,
28 | pre .preprocessor,
29 | pre .ruby .symbol,
30 | pre .ruby .symbol .string,
31 | pre .aggregate,
32 | pre .template_tag,
33 | pre .django .variable,
34 | pre .smalltalk .class,
35 | pre .addition,
36 | pre .flow,
37 | pre .stream,
38 | pre .bash .variable,
39 | pre .apache .cbracket {
40 | color: #050;
41 | }
42 |
43 | pre .comment,
44 | pre .annotation,
45 | pre .template_comment,
46 | pre .diff .header,
47 | pre .chunk {
48 | color: #777;
49 | }
50 |
51 | pre .number,
52 | pre .date,
53 | pre .regexp,
54 | pre .literal,
55 | pre .smalltalk .symbol,
56 | pre .smalltalk .char,
57 | pre .change,
58 | pre .tex .special {
59 | color: #800;
60 | }
61 |
62 | pre .label,
63 | pre .javadoc,
64 | pre .ruby .string,
65 | pre .decorator,
66 | pre .filter .argument,
67 | pre .localvars,
68 | pre .array,
69 | pre .attr_selector,
70 | pre .pseudo,
71 | pre .pi,
72 | pre .doctype,
73 | pre .deletion,
74 | pre .envvar,
75 | pre .shebang,
76 | pre .apache .sqbracket,
77 | pre .nginx .built_in,
78 | pre .tex .formula,
79 | pre .prompt,
80 | pre .clojure .attribute {
81 | color: #00e;
82 | }
83 |
84 | pre .keyword,
85 | pre .id,
86 | pre .phpdoc,
87 | pre .title,
88 | pre .built_in,
89 | pre .aggregate,
90 | pre .smalltalk .class,
91 | pre .winutils,
92 | pre .bash .variable,
93 | pre .apache .tag,
94 | pre .xml .tag,
95 | pre .tex .command,
96 | pre .request,
97 | pre .status {
98 | font-weight: bold;
99 | color: navy;
100 | }
101 |
102 | pre .nginx .built_in {
103 | font-weight: normal;
104 | }
105 |
106 | pre .coffeescript .javascript,
107 | pre .javascript .xml,
108 | pre .tex .formula,
109 | pre .xml .javascript,
110 | pre .xml .vbscript,
111 | pre .xml .css,
112 | pre .xml .cdata {
113 | opacity: 0.5;
114 | }
115 |
116 | /* --- */
117 | pre .apache .tag {
118 | font-weight: bold;
119 | color: blue;
120 | }
121 |
122 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/monokai.css:
--------------------------------------------------------------------------------
1 | /*
2 | Monokai style - ported by Luigi Maselli - http://grigio.org
3 | */
4 |
5 | pre code {
6 | display: block; padding: 0.5em;
7 | background: #272822;
8 | }
9 |
10 | pre .tag,
11 | pre .tag .title,
12 | pre .keyword,
13 | pre .literal,
14 | pre .change,
15 | pre .winutils,
16 | pre .flow,
17 | pre .lisp .title,
18 | pre .clojure .built_in,
19 | pre .nginx .title,
20 | pre .tex .special {
21 | color: #F92672;
22 | }
23 |
24 | pre code {
25 | color: #DDD;
26 | }
27 |
28 | pre code .constant {
29 | color: #66D9EF;
30 | }
31 |
32 | pre .class .title {
33 | color: white;
34 | }
35 |
36 | pre .attribute,
37 | pre .symbol,
38 | pre .symbol .string,
39 | pre .value,
40 | pre .regexp {
41 | color: #BF79DB;
42 | }
43 |
44 | pre .tag .value,
45 | pre .string,
46 | pre .subst,
47 | pre .title,
48 | pre .haskell .type,
49 | pre .preprocessor,
50 | pre .ruby .class .parent,
51 | pre .built_in,
52 | pre .sql .aggregate,
53 | pre .django .template_tag,
54 | pre .django .variable,
55 | pre .smalltalk .class,
56 | pre .javadoc,
57 | pre .django .filter .argument,
58 | pre .smalltalk .localvars,
59 | pre .smalltalk .array,
60 | pre .attr_selector,
61 | pre .pseudo,
62 | pre .addition,
63 | pre .stream,
64 | pre .envvar,
65 | pre .apache .tag,
66 | pre .apache .cbracket,
67 | pre .tex .command,
68 | pre .prompt {
69 | color: #A6E22E;
70 | }
71 |
72 | pre .comment,
73 | pre .java .annotation,
74 | pre .python .decorator,
75 | pre .template_comment,
76 | pre .pi,
77 | pre .doctype,
78 | pre .deletion,
79 | pre .shebang,
80 | pre .apache .sqbracket,
81 | pre .tex .formula {
82 | color: #75715E;
83 | }
84 |
85 | pre .keyword,
86 | pre .literal,
87 | pre .css .id,
88 | pre .phpdoc,
89 | pre .title,
90 | pre .haskell .type,
91 | pre .vbscript .built_in,
92 | pre .sql .aggregate,
93 | pre .rsl .built_in,
94 | pre .smalltalk .class,
95 | pre .diff .header,
96 | pre .chunk,
97 | pre .winutils,
98 | pre .bash .variable,
99 | pre .apache .tag,
100 | pre .tex .special,
101 | pre .request,
102 | pre .status {
103 | font-weight: bold;
104 | }
105 |
106 | pre .coffeescript .javascript,
107 | pre .javascript .xml,
108 | pre .tex .formula,
109 | pre .xml .javascript,
110 | pre .xml .vbscript,
111 | pre .xml .css,
112 | pre .xml .cdata {
113 | opacity: 0.5;
114 | }
115 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/pojoaque.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Pojoaque Style by Jason Tate
4 | http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
5 | Based on Solarized Style from http://ethanschoonover.com/solarized
6 |
7 | */
8 |
9 | pre code {
10 | display: block; padding: 0.5em;
11 | color: #DCCF8F;
12 | background: url(./pojoaque.jpg) repeat scroll left top #181914;
13 | }
14 |
15 | pre .comment,
16 | pre .template_comment,
17 | pre .diff .header,
18 | pre .doctype,
19 | pre .lisp .string,
20 | pre .javadoc {
21 | color: #586e75;
22 | font-style: italic;
23 | }
24 |
25 | pre .keyword,
26 | pre .css .rule .keyword,
27 | pre .winutils,
28 | pre .javascript .title,
29 | pre .method,
30 | pre .addition,
31 | pre .css .tag,
32 | pre .clojure .title,
33 | pre .nginx .title {
34 | color: #B64926;
35 | }
36 |
37 | pre .number,
38 | pre .command,
39 | pre .string,
40 | pre .tag .value,
41 | pre .phpdoc,
42 | pre .tex .formula,
43 | pre .regexp,
44 | pre .hexcolor {
45 | color: #468966;
46 | }
47 |
48 | pre .title,
49 | pre .localvars,
50 | pre .function .title,
51 | pre .chunk,
52 | pre .decorator,
53 | pre .built_in,
54 | pre .lisp .title,
55 | pre .clojure .built_in,
56 | pre .identifier,
57 | pre .id {
58 | color: #FFB03B;
59 | }
60 |
61 | pre .attribute,
62 | pre .variable,
63 | pre .lisp .body,
64 | pre .smalltalk .number,
65 | pre .constant,
66 | pre .class .title,
67 | pre .parent,
68 | pre .haskell .type {
69 | color: #b58900;
70 | }
71 |
72 | pre .css .attribute {
73 | color: #b89859;
74 | }
75 |
76 | pre .css .number,pre .css .hexcolor{
77 | color: #DCCF8F;
78 | }
79 |
80 | pre .css .class {
81 | color: #d3a60c;
82 | }
83 |
84 | pre .preprocessor,
85 | pre .pi,
86 | pre .shebang,
87 | pre .symbol,
88 | pre .symbol .string,
89 | pre .diff .change,
90 | pre .special,
91 | pre .attr_selector,
92 | pre .important,
93 | pre .subst,
94 | pre .cdata {
95 | color: #cb4b16;
96 | }
97 |
98 | pre .deletion {
99 | color: #dc322f;
100 | }
101 |
102 | pre .tex .formula {
103 | background: #073642;
104 | }
105 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/pojoaque.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/javascript/highlight.js/styles/pojoaque.jpg
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/rainbow.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Style with support for rainbow parens
4 |
5 | */
6 |
7 | pre ::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
8 | pre ::selection { background:#FF5E99; color:#fff; text-shadow: none; }
9 |
10 | pre code {
11 | display: block; padding: 0.5em;
12 | background: #474949; color: #D1D9E1;
13 | }
14 |
15 |
16 | pre .body,
17 | pre .collection {
18 | color: #D1D9E1;
19 | }
20 |
21 | pre .comment,
22 | pre .template_comment,
23 | pre .diff .header,
24 | pre .doctype,
25 | pre .lisp .string,
26 | pre .javadoc {
27 | color: #969896;
28 | font-style: italic;
29 | }
30 |
31 | pre .keyword,
32 | pre .clojure .attribute,
33 | pre .winutils,
34 | pre .javascript .title,
35 | pre .addition,
36 | pre .css .tag {
37 | color: #cc99cc;
38 | }
39 |
40 | pre .number { color: #f99157; }
41 |
42 | pre .command,
43 | pre .string,
44 | pre .tag .value,
45 | pre .phpdoc,
46 | pre .tex .formula,
47 | pre .regexp,
48 | pre .hexcolor {
49 | color: #8abeb7;
50 | }
51 |
52 | pre .title,
53 | pre .localvars,
54 | pre .function .title,
55 | pre .chunk,
56 | pre .decorator,
57 | pre .built_in,
58 | pre .lisp .title,
59 | pre .identifier
60 | {
61 | color: #b5bd68;
62 | }
63 |
64 | pre .class .keyword
65 | {
66 | color: #f2777a;
67 | }
68 |
69 | pre .variable,
70 | pre .lisp .body,
71 | pre .smalltalk .number,
72 | pre .constant,
73 | pre .class .title,
74 | pre .parent,
75 | pre .haskell .label,
76 | pre .id,
77 | pre .lisp .title,
78 | pre .clojure .title .built_in {
79 | color: #ffcc66;
80 | }
81 |
82 | pre .tag .title,
83 | pre .rules .property,
84 | pre .django .tag .keyword,
85 | pre .clojure .title .built_in {
86 | font-weight: bold;
87 | }
88 |
89 | pre .attribute,
90 | pre .clojure .title {
91 | color: #81a2be;
92 | }
93 |
94 | pre .preprocessor,
95 | pre .pi,
96 | pre .shebang,
97 | pre .symbol,
98 | pre .symbol .string,
99 | pre .diff .change,
100 | pre .special,
101 | pre .attr_selector,
102 | pre .important,
103 | pre .subst,
104 | pre .cdata {
105 | color: #f99157;
106 | }
107 |
108 | pre .deletion {
109 | color: #dc322f;
110 | }
111 |
112 | pre .tex .formula {
113 | background: #eee8d5;
114 | }
115 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/school_book.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | School Book style from goldblog.com.ua (c) Zaripov Yura
4 |
5 | */
6 |
7 | pre code {
8 | display: block; padding: 15px 0.5em 0.5em 30px;
9 | font-size: 11px !important;
10 | line-height:16px !important;
11 | }
12 |
13 | pre{
14 | background:#f6f6ae url(./school_book.png);
15 | border-top: solid 2px #d2e8b9;
16 | border-bottom: solid 1px #d2e8b9;
17 | }
18 |
19 | pre .keyword,
20 | pre .literal,
21 | pre .change,
22 | pre .winutils,
23 | pre .flow,
24 | pre .lisp .title,
25 | pre .clojure .built_in,
26 | pre .nginx .title,
27 | pre .tex .special {
28 | color:#005599;
29 | font-weight:bold;
30 | }
31 |
32 | pre code,
33 | pre .subst,
34 | pre .tag .keyword {
35 | color: #3E5915;
36 | }
37 |
38 | pre .string,
39 | pre .title,
40 | pre .haskell .type,
41 | pre .tag .value,
42 | pre .css .rules .value,
43 | pre .preprocessor,
44 | pre .ruby .symbol,
45 | pre .ruby .symbol .string,
46 | pre .ruby .class .parent,
47 | pre .built_in,
48 | pre .sql .aggregate,
49 | pre .django .template_tag,
50 | pre .django .variable,
51 | pre .smalltalk .class,
52 | pre .javadoc,
53 | pre .ruby .string,
54 | pre .django .filter .argument,
55 | pre .smalltalk .localvars,
56 | pre .smalltalk .array,
57 | pre .attr_selector,
58 | pre .pseudo,
59 | pre .addition,
60 | pre .stream,
61 | pre .envvar,
62 | pre .apache .tag,
63 | pre .apache .cbracket,
64 | pre .nginx .built_in,
65 | pre .tex .command {
66 | color: #2C009F;
67 | }
68 |
69 | pre .comment,
70 | pre .java .annotation,
71 | pre .python .decorator,
72 | pre .template_comment,
73 | pre .pi,
74 | pre .doctype,
75 | pre .deletion,
76 | pre .shebang,
77 | pre .apache .sqbracket {
78 | color: #E60415;
79 | }
80 |
81 | pre .keyword,
82 | pre .literal,
83 | pre .css .id,
84 | pre .phpdoc,
85 | pre .title,
86 | pre .haskell .type,
87 | pre .vbscript .built_in,
88 | pre .sql .aggregate,
89 | pre .rsl .built_in,
90 | pre .smalltalk .class,
91 | pre .xml .tag .title,
92 | pre .diff .header,
93 | pre .chunk,
94 | pre .winutils,
95 | pre .bash .variable,
96 | pre .apache .tag,
97 | pre .tex .command,
98 | pre .request,
99 | pre .status {
100 | font-weight: bold;
101 | }
102 |
103 | pre .coffeescript .javascript,
104 | pre .javascript .xml,
105 | pre .tex .formula,
106 | pre .xml .javascript,
107 | pre .xml .vbscript,
108 | pre .xml .css,
109 | pre .xml .cdata {
110 | opacity: 0.5;
111 | }
112 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/school_book.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodingmachine/mouf/5be8ec487c92fb94c6c1a6308f6a19dcae50a339/src-dev/views/javascript/highlight.js/styles/school_book.png
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/solarized_dark.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull
4 |
5 | */
6 |
7 | pre code {
8 | display: block; padding: 0.5em;
9 | background: #002b36; color: #839496;
10 | }
11 |
12 | pre .comment,
13 | pre .template_comment,
14 | pre .diff .header,
15 | pre .doctype,
16 | pre .pi,
17 | pre .lisp .string,
18 | pre .javadoc {
19 | color: #586e75;
20 | font-style: italic;
21 | }
22 |
23 | pre .keyword,
24 | pre .winutils,
25 | pre .method,
26 | pre .addition,
27 | pre .css .tag,
28 | pre .request,
29 | pre .status,
30 | pre .nginx .title {
31 | color: #859900;
32 | }
33 |
34 | pre .number,
35 | pre .command,
36 | pre .string,
37 | pre .tag .value,
38 | pre .phpdoc,
39 | pre .tex .formula,
40 | pre .regexp,
41 | pre .hexcolor {
42 | color: #2aa198;
43 | }
44 |
45 | pre .title,
46 | pre .localvars,
47 | pre .chunk,
48 | pre .decorator,
49 | pre .built_in,
50 | pre .identifier,
51 | pre .vhdl .literal,
52 | pre .id {
53 | color: #268bd2;
54 | }
55 |
56 | pre .attribute,
57 | pre .variable,
58 | pre .lisp .body,
59 | pre .smalltalk .number,
60 | pre .constant,
61 | pre .class .title,
62 | pre .parent,
63 | pre .haskell .type {
64 | color: #b58900;
65 | }
66 |
67 | pre .preprocessor,
68 | pre .preprocessor .keyword,
69 | pre .shebang,
70 | pre .symbol,
71 | pre .symbol .string,
72 | pre .diff .change,
73 | pre .special,
74 | pre .attr_selector,
75 | pre .important,
76 | pre .subst,
77 | pre .cdata,
78 | pre .clojure .title {
79 | color: #cb4b16;
80 | }
81 |
82 | pre .deletion {
83 | color: #dc322f;
84 | }
85 |
86 | pre .tex .formula {
87 | background: #073642;
88 | }
89 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/solarized_light.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull
4 |
5 | */
6 |
7 | pre code {
8 | display: block; padding: 0.5em;
9 | background: #fdf6e3; color: #657b83;
10 | }
11 |
12 | pre .comment,
13 | pre .template_comment,
14 | pre .diff .header,
15 | pre .doctype,
16 | pre .pi,
17 | pre .lisp .string,
18 | pre .javadoc {
19 | color: #93a1a1;
20 | font-style: italic;
21 | }
22 |
23 | pre .keyword,
24 | pre .winutils,
25 | pre .method,
26 | pre .addition,
27 | pre .css .tag,
28 | pre .request,
29 | pre .status,
30 | pre .nginx .title {
31 | color: #859900;
32 | }
33 |
34 | pre .number,
35 | pre .command,
36 | pre .string,
37 | pre .tag .value,
38 | pre .phpdoc,
39 | pre .tex .formula,
40 | pre .regexp,
41 | pre .hexcolor {
42 | color: #2aa198;
43 | }
44 |
45 | pre .title,
46 | pre .localvars,
47 | pre .chunk,
48 | pre .decorator,
49 | pre .built_in,
50 | pre .identifier,
51 | pre .vhdl .literal,
52 | pre .id {
53 | color: #268bd2;
54 | }
55 |
56 | pre .attribute,
57 | pre .variable,
58 | pre .lisp .body,
59 | pre .smalltalk .number,
60 | pre .constant,
61 | pre .class .title,
62 | pre .parent,
63 | pre .haskell .type {
64 | color: #b58900;
65 | }
66 |
67 | pre .preprocessor,
68 | pre .preprocessor .keyword,
69 | pre .shebang,
70 | pre .symbol,
71 | pre .symbol .string,
72 | pre .diff .change,
73 | pre .special,
74 | pre .attr_selector,
75 | pre .important,
76 | pre .subst,
77 | pre .cdata,
78 | pre .clojure .title {
79 | color: #cb4b16;
80 | }
81 |
82 | pre .deletion {
83 | color: #dc322f;
84 | }
85 |
86 | pre .tex .formula {
87 | background: #eee8d5;
88 | }
89 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/tomorrow-night-blue.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Night Blue Theme */
2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
5 | .tomorrow-comment, pre .comment, pre .title {
6 | color: #7285b7;
7 | }
8 |
9 | .tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
10 | color: #ff9da4;
11 | }
12 |
13 | .tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
14 | color: #ffc58f;
15 | }
16 |
17 | .tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
18 | color: #ffeead;
19 | }
20 |
21 | .tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
22 | color: #d1f1a9;
23 | }
24 |
25 | .tomorrow-aqua, pre .css .hexcolor {
26 | color: #99ffff;
27 | }
28 |
29 | .tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
30 | color: #bbdaff;
31 | }
32 |
33 | .tomorrow-purple, pre .keyword, pre .javascript .function {
34 | color: #ebbbff;
35 | }
36 |
37 | pre code {
38 | display: block;
39 | background: #002451;
40 | color: white;
41 | padding: 0.5em;
42 | }
43 |
44 | pre .coffeescript .javascript,
45 | pre .javascript .xml,
46 | pre .tex .formula,
47 | pre .xml .javascript,
48 | pre .xml .vbscript,
49 | pre .xml .css,
50 | pre .xml .cdata {
51 | opacity: 0.5;
52 | }
53 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/tomorrow-night-bright.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Night Bright Theme */
2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
4 | .tomorrow-comment, pre .comment, pre .title {
5 | color: #969896;
6 | }
7 |
8 | .tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
9 | color: #d54e53;
10 | }
11 |
12 | .tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
13 | color: #e78c45;
14 | }
15 |
16 | .tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
17 | color: #e7c547;
18 | }
19 |
20 | .tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
21 | color: #b9ca4a;
22 | }
23 |
24 | .tomorrow-aqua, pre .css .hexcolor {
25 | color: #70c0b1;
26 | }
27 |
28 | .tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
29 | color: #7aa6da;
30 | }
31 |
32 | .tomorrow-purple, pre .keyword, pre .javascript .function {
33 | color: #c397d8;
34 | }
35 |
36 | pre code {
37 | display: block;
38 | background: black;
39 | color: #eaeaea;
40 | padding: 0.5em;
41 | }
42 |
43 | pre .coffeescript .javascript,
44 | pre .javascript .xml,
45 | pre .tex .formula,
46 | pre .xml .javascript,
47 | pre .xml .vbscript,
48 | pre .xml .css,
49 | pre .xml .cdata {
50 | opacity: 0.5;
51 | }
52 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/tomorrow-night-eighties.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Night Eighties Theme */
2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
4 | .tomorrow-comment, pre .comment, pre .title {
5 | color: #999999;
6 | }
7 |
8 | .tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
9 | color: #f2777a;
10 | }
11 |
12 | .tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
13 | color: #f99157;
14 | }
15 |
16 | .tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
17 | color: #ffcc66;
18 | }
19 |
20 | .tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
21 | color: #99cc99;
22 | }
23 |
24 | .tomorrow-aqua, pre .css .hexcolor {
25 | color: #66cccc;
26 | }
27 |
28 | .tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
29 | color: #6699cc;
30 | }
31 |
32 | .tomorrow-purple, pre .keyword, pre .javascript .function {
33 | color: #cc99cc;
34 | }
35 |
36 | pre code {
37 | display: block;
38 | background: #2d2d2d;
39 | color: #cccccc;
40 | padding: 0.5em;
41 | }
42 |
43 | pre .coffeescript .javascript,
44 | pre .javascript .xml,
45 | pre .tex .formula,
46 | pre .xml .javascript,
47 | pre .xml .vbscript,
48 | pre .xml .css,
49 | pre .xml .cdata {
50 | opacity: 0.5;
51 | }
52 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/tomorrow-night.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Night Theme */
2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
5 | .tomorrow-comment, pre .comment, pre .title {
6 | color: #969896;
7 | }
8 |
9 | .tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
10 | color: #cc6666;
11 | }
12 |
13 | .tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
14 | color: #de935f;
15 | }
16 |
17 | .tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
18 | color: #f0c674;
19 | }
20 |
21 | .tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
22 | color: #b5bd68;
23 | }
24 |
25 | .tomorrow-aqua, pre .css .hexcolor {
26 | color: #8abeb7;
27 | }
28 |
29 | .tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
30 | color: #81a2be;
31 | }
32 |
33 | .tomorrow-purple, pre .keyword, pre .javascript .function {
34 | color: #b294bb;
35 | }
36 |
37 | pre code {
38 | display: block;
39 | background: #1d1f21;
40 | color: #c5c8c6;
41 | padding: 0.5em;
42 | }
43 |
44 | pre .coffeescript .javascript,
45 | pre .javascript .xml,
46 | pre .tex .formula,
47 | pre .xml .javascript,
48 | pre .xml .vbscript,
49 | pre .xml .css,
50 | pre .xml .cdata {
51 | opacity: 0.5;
52 | }
53 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/tomorrow.css:
--------------------------------------------------------------------------------
1 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
2 | .tomorrow-comment, pre .comment, pre .title {
3 | color: #8e908c;
4 | }
5 |
6 | .tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
7 | color: #c82829;
8 | }
9 |
10 | .tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
11 | color: #f5871f;
12 | }
13 |
14 | .tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
15 | color: #eab700;
16 | }
17 |
18 | .tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
19 | color: #718c00;
20 | }
21 |
22 | .tomorrow-aqua, pre .css .hexcolor {
23 | color: #3e999f;
24 | }
25 |
26 | .tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
27 | color: #4271ae;
28 | }
29 |
30 | .tomorrow-purple, pre .keyword, pre .javascript .function {
31 | color: #8959a8;
32 | }
33 |
34 | pre code {
35 | display: block;
36 | background: white;
37 | color: #4d4d4c;
38 | padding: 0.5em;
39 | }
40 |
41 | pre .coffeescript .javascript,
42 | pre .javascript .xml,
43 | pre .tex .formula,
44 | pre .xml .javascript,
45 | pre .xml .vbscript,
46 | pre .xml .css,
47 | pre .xml .cdata {
48 | opacity: 0.5;
49 | }
50 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/vs.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Visual Studio-like style based on original C# coloring by Jason Diamond
4 |
5 | */
6 | pre code {
7 | display: block; padding: 0.5em;
8 | }
9 |
10 | pre .comment,
11 | pre .annotation,
12 | pre .template_comment,
13 | pre .diff .header,
14 | pre .chunk,
15 | pre .apache .cbracket {
16 | color: rgb(0, 128, 0);
17 | }
18 |
19 | pre .keyword,
20 | pre .id,
21 | pre .built_in,
22 | pre .smalltalk .class,
23 | pre .winutils,
24 | pre .bash .variable,
25 | pre .tex .command,
26 | pre .request,
27 | pre .status,
28 | pre .nginx .title,
29 | pre .xml .tag,
30 | pre .xml .tag .value {
31 | color: rgb(0, 0, 255);
32 | }
33 |
34 | pre .string,
35 | pre .title,
36 | pre .parent,
37 | pre .tag .value,
38 | pre .rules .value,
39 | pre .rules .value .number,
40 | pre .ruby .symbol,
41 | pre .ruby .symbol .string,
42 | pre .aggregate,
43 | pre .template_tag,
44 | pre .django .variable,
45 | pre .addition,
46 | pre .flow,
47 | pre .stream,
48 | pre .apache .tag,
49 | pre .date,
50 | pre .tex .formula {
51 | color: rgb(163, 21, 21);
52 | }
53 |
54 | pre .ruby .string,
55 | pre .decorator,
56 | pre .filter .argument,
57 | pre .localvars,
58 | pre .array,
59 | pre .attr_selector,
60 | pre .pseudo,
61 | pre .pi,
62 | pre .doctype,
63 | pre .deletion,
64 | pre .envvar,
65 | pre .shebang,
66 | pre .preprocessor,
67 | pre .userType,
68 | pre .apache .sqbracket,
69 | pre .nginx .built_in,
70 | pre .tex .special,
71 | pre .prompt {
72 | color: rgb(43, 145, 175);
73 | }
74 |
75 | pre .phpdoc,
76 | pre .javadoc,
77 | pre .xmlDocTag {
78 | color: rgb(128, 128, 128);
79 | }
80 |
81 | pre .vhdl .typename { font-weight: bold; }
82 | pre .vhdl .string { color: #666666; }
83 | pre .vhdl .literal { color: rgb(163, 21, 21); }
84 | pre .vhdl .attribute { color: #00B0E8; }
85 |
86 | pre .xml .attribute { color: rgb(255, 0, 0); }
87 |
--------------------------------------------------------------------------------
/src-dev/views/javascript/highlight.js/styles/zenburn.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov
4 | based on dark.css by Ivan Sagalaev
5 |
6 | */
7 |
8 | pre code {
9 | display: block; padding: 0.5em;
10 | background: #3F3F3F;
11 | color: #DCDCDC;
12 | }
13 |
14 | pre .keyword,
15 | pre .tag,
16 | pre .css .class,
17 | pre .css .id,
18 | pre .lisp .title,
19 | pre .nginx .title,
20 | pre .request,
21 | pre .status,
22 | pre .clojure .attribute {
23 | color: #E3CEAB;
24 | }
25 |
26 | pre .django .template_tag,
27 | pre .django .variable,
28 | pre .django .filter .argument {
29 | color: #DCDCDC;
30 | }
31 |
32 | pre .number,
33 | pre .date {
34 | color: #8CD0D3;
35 | }
36 |
37 | pre .dos .envvar,
38 | pre .dos .stream,
39 | pre .variable,
40 | pre .apache .sqbracket {
41 | color: #EFDCBC;
42 | }
43 |
44 | pre .dos .flow,
45 | pre .diff .change,
46 | pre .python .exception,
47 | pre .python .built_in,
48 | pre .literal,
49 | pre .tex .special {
50 | color: #EFEFAF;
51 | }
52 |
53 | pre .diff .chunk,
54 | pre .subst {
55 | color: #8F8F8F;
56 | }
57 |
58 | pre .dos .keyword,
59 | pre .python .decorator,
60 | pre .title,
61 | pre .haskell .type,
62 | pre .diff .header,
63 | pre .ruby .class .parent,
64 | pre .apache .tag,
65 | pre .nginx .built_in,
66 | pre .tex .command,
67 | pre .prompt {
68 | color: #efef8f;
69 | }
70 |
71 | pre .dos .winutils,
72 | pre .ruby .symbol,
73 | pre .ruby .symbol .string,
74 | pre .ruby .string {
75 | color: #DCA3A3;
76 | }
77 |
78 | pre .diff .deletion,
79 | pre .string,
80 | pre .tag .value,
81 | pre .preprocessor,
82 | pre .built_in,
83 | pre .sql .aggregate,
84 | pre .javadoc,
85 | pre .smalltalk .class,
86 | pre .smalltalk .localvars,
87 | pre .smalltalk .array,
88 | pre .css .rules .value,
89 | pre .attr_selector,
90 | pre .pseudo,
91 | pre .apache .cbracket,
92 | pre .tex .formula {
93 | color: #CC9393;
94 | }
95 |
96 | pre .shebang,
97 | pre .diff .addition,
98 | pre .comment,
99 | pre .java .annotation,
100 | pre .template_comment,
101 | pre .pi,
102 | pre .doctype {
103 | color: #7F9F7F;
104 | }
105 |
106 | pre .coffeescript .javascript,
107 | pre .javascript .xml,
108 | pre .tex .formula,
109 | pre .xml .javascript,
110 | pre .xml .vbscript,
111 | pre .xml .css,
112 | pre .xml .cdata {
113 | opacity: 0.5;
114 | }
115 |
116 |
--------------------------------------------------------------------------------
/src-dev/views/listComponents.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /** @deprecated */
12 | ?>
13 | Available component instances
14 |
15 | moufManager->getInstancesList())) {
17 | foreach ($this->moufManager->getInstancesList() as $key=>$value) {
18 |
19 | echo "";
20 | echo plainstring_to_htmlprotected($key);
21 | echo " - ".plainstring_to_htmlprotected($value)."
";
22 | }
23 | }
24 | ?>
--------------------------------------------------------------------------------
/src-dev/views/mouf_installer/missing_curl.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | Welcome!
4 | Missing dependencies
5 |
6 | In order to run Mouf, you will first need to enable the "php_curl" extension on your server.
7 |
8 | Please enable this PHP extension and refresh this page.
9 | You can follow the installation document if you need help.
10 |
--------------------------------------------------------------------------------
/src-dev/views/mouf_installer/missing_htaccess.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | Welcome!
4 | Apache configuration problem
5 |
6 | In order to run Mouf, you need to use Apache, and be allowed to use .htaccess
files.
7 |
8 | It is likely that your Apache server has been configured to ignore the .htaccess
files.
9 | Please dive into your Apache configuration and look for a AllowOverride
directive.
10 | You should set this directive to: AllowOverride All
.
11 |
12 | You can follow the installation document if you need help.
13 |
--------------------------------------------------------------------------------
/src-dev/views/mouf_installer/moufusers_exists.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | Welcome!
4 | Installation problem
5 |
6 | You cannot run Mouf's installer, the mouf/no_commit/MoufUsers.php
file already exists.
7 |
8 | If you want to reinstall Mouf, you should delete the mouf/no_commit/MoufUsers.php
page and then refresh this page.
9 |
10 | You can follow the installation document if you need help.
11 |
--------------------------------------------------------------------------------
/src-dev/views/search/results.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | ?>
11 | Results for query) ?>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src-dev/views/search/searchbox.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | ?>
12 |
--------------------------------------------------------------------------------
/src-dev/views/testview.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | ?>
12 |
13 |
14 | Canvas tutorial
15 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/Mouf/Annotations/ExtendedActionAnnotation.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Annotations;
11 |
12 |
13 | use Mouf\MoufException;
14 |
15 | /**
16 | * The @ExtendedAction annotation.
17 | * This annotation is used in classes to provide additional screens to configure the component.
18 | *
19 | * The ExtendedAction annotation takes a JSON array in attribute in this form: @ExtendedAction {"name":"Edit", "url":"mouf/mysqlconnectionedit", "default":true}
20 | *
21 | */
22 | class ExtendedActionAnnotation
23 | {
24 | private $name;
25 | private $url;
26 | private $default;
27 |
28 | public function __construct($value)
29 | {
30 | $result = json_decode($value);
31 | if ($result == null) {
32 | throw new MoufException("Error in a @ExtendedActionAnnotation. The parameter passed is not a valid JSON string. String passed: ".$value);
33 | }
34 | if (!isset($result->name)) {
35 | throw new MoufException('Error in a @ExtendedActionAnnotation. The parameter "name" is compulsory. For instance: @ExtendedAction {"name":"Edit", url:"mouf/mysqlconnectionedit", default:true}');
36 | }
37 | if (!isset($result->url)) {
38 | throw new MoufException('Error in a @ExtendedActionAnnotation. The parameter "url" is compulsory. For instance: @ExtendedAction {"name":"Edit", url:"mouf/mysqlconnectionedit", default:true}');
39 | }
40 | $this->name = $result->name;
41 | $this->url = $result->url;
42 | if (isset($result->default)) {
43 | $this->default = $result->default;
44 | }
45 | }
46 |
47 | /**
48 | * Returns the name of the extended action (the label of the link in the menu).
49 | *
50 | * @return string
51 | */
52 | public function getName() {
53 | return $this->name;
54 | }
55 |
56 | /**
57 | * Returns the url of the extended action (the label of the link in the menu).
58 | *
59 | * @return string
60 | */
61 | public function getUrl() {
62 | return $this->url;
63 | }
64 |
65 | /**
66 | * True if this action is supposed to be the default action to be displayed for that component.
67 | *
68 | * @return bool
69 | */
70 | public function isDefault() {
71 | return $this->default;
72 | }
73 |
74 | }
75 |
76 | ?>
77 |
--------------------------------------------------------------------------------
/src/Mouf/Annotations/OneOfAnnotation.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Annotations;
11 |
12 | use Mouf\Reflection\MoufAnnotationHelper;
13 |
14 | /**
15 | * The @OneOf annotation.
16 | * This annotation contains a list of possible values for a property.
17 | *
18 | */
19 | class OneOfAnnotation
20 | {
21 | private $possibleValues;
22 |
23 | public function __construct($value)
24 | {
25 | $this->possibleValues = MoufAnnotationHelper::getValueAsList($value);
26 | }
27 |
28 | /**
29 | * Returns the list of possible values.
30 | *
31 | * @return array
32 | */
33 | public function getPossibleValues() {
34 | return $this->possibleValues;
35 | }
36 |
37 | }
38 |
39 | ?>
40 |
--------------------------------------------------------------------------------
/src/Mouf/Annotations/OneOfTextAnnotation.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Annotations;
11 |
12 | use Mouf\Reflection\MoufAnnotationHelper;
13 |
14 | /**
15 | * The @OneOfText annotation.
16 | * This annotation contains a list of possible values for a property.
17 | *
18 | */
19 | class OneOfTextAnnotation
20 | {
21 | private $possibleValues;
22 |
23 | public function __construct($value)
24 | {
25 | $this->possibleValues = MoufAnnotationHelper::getValueAsList($value);
26 | }
27 |
28 | /**
29 | * Returns the list of possible values.
30 | *
31 | * @return array
32 | */
33 | public function getPossibleValues() {
34 | return $this->possibleValues;
35 | }
36 |
37 | }
38 |
39 | ?>
40 |
--------------------------------------------------------------------------------
/src/Mouf/Annotations/varAnnotation.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Annotations;
11 |
12 |
13 | use Mouf\Reflection\TypesDescriptor;
14 |
15 | use Mouf\Reflection\TypeDescriptor;
16 |
17 | /**
18 | * The @var annotation.
19 | * This annotation contains the type as the first word.
20 | *
21 | * The type can be any class or interface, or a primitive type (string, boolean, ...)
22 | * It can also be an array. In this case, you can specify the array type using: array, or even array
23 | */
24 | class varAnnotation
25 | {
26 | private $types;
27 |
28 | public function __construct($value)
29 | {
30 | $this->analyzeType($value);
31 | }
32 |
33 | /**
34 | * Analyzes the type and fills the type (and keytype and subtype if necessary).
35 | *
36 | * @param string $value
37 | */
38 | protected function analyzeType($value) {
39 | $this->types = TypesDescriptor::parseTypeString($value);
40 | }
41 |
42 |
43 | /**
44 | * Returns the main type.
45 | *
46 | * @return TypesDescriptor
47 | */
48 | public function getTypes() {
49 | return $this->types;
50 | }
51 |
52 | /**
53 | * Returns the main type.
54 | *
55 | * @return string
56 | */
57 | /*public function getType() {
58 | return $this->type;
59 | }*/
60 |
61 | /**
62 | * Returns the type of the array (if the main type is an array)
63 | *
64 | * @return string
65 | */
66 | /*public function getSubType() {
67 | return $this->subtype;
68 | }*/
69 |
70 | /**
71 | * Returns the type of the key of the array (if the main type is an array)
72 | *
73 | * @return string
74 | */
75 | /*public function getKeyType() {
76 | return $this->keytype;
77 | }*/
78 |
79 | /**
80 | * Returns true if the type is an array and it has a key defined.
81 | *
82 | * @return boolean
83 | */
84 | /*public function isAssociativeArray() {
85 | return $this->keytype !== null;
86 | }*/
87 |
88 | }
89 |
--------------------------------------------------------------------------------
/src/Mouf/ClassNotFoundException.php:
--------------------------------------------------------------------------------
1 | className = $className;
27 | $this->selfEdit = $selfEdit;
28 | }
29 |
30 | /**
31 | * Intercepts any call to any static function and forwards it to the proxy.
32 | *
33 | * @param string $methodName
34 | * @param array $arguments
35 | */
36 | public function __call($methodName, $arguments) {
37 | $postArray = array("class"=>$this->className, "method"=>$methodName, "args"=>serialize($arguments));
38 |
39 | $url = MoufReflectionProxy::getLocalUrlToProject()."src/direct/proxy.php";
40 |
41 | $response = MoufReflectionProxy::performRequest($url, $postArray);
42 |
43 | $obj = @unserialize($response);
44 |
45 | if ($obj === false) {
46 | // Is this an unserialized "false" or an error in unserialization?
47 | if ($response != serialize(false)) {
48 | throw new MoufException("Unable to unserialize message:\n".$response."\n
URL in error: ".htmlentities($url)."");
49 | }
50 | }
51 |
52 | return $obj;
53 | }
54 | }
--------------------------------------------------------------------------------
/src/Mouf/CodeValidatorService.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf;
11 |
12 | use PhpParser\Error;
13 | use PhpParser\ParserFactory;
14 |
15 | // Fix autoloading that is broken in Composer plugins
16 | if (!class_exists("\\PhpParser\\ParserFactory")) {
17 | require_once __DIR__.'/../../vendor/nikic/php-parser/lib/bootstrap.php';
18 | }
19 |
20 | /**
21 | * This class is used to validate the PHP code that will be used as a callback
22 | * in the container.
23 | *
24 | */
25 | class CodeValidatorService {
26 | /**
27 | * This function will throw a PhpParser\Error exception if a parsing error is met in the code.
28 | *
29 | * @param string $codeString
30 | * @throws \PhpParser\Error
31 | */
32 | public static function validateCode($codeString) {
33 | $code = "";
34 |
35 | $parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
36 |
37 | $stmts = $parser->parse($code);
38 |
39 | // If we are here, the code is correct.
40 | // Let's add a last check: whether there is a "return" keyword or not.
41 | if (stripos($code, "return") === false) {
42 | throw new Error("Missing 'return' keyword.", count(explode("\n", $codeString)));
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Mouf/Composer/ChunckedUtils.php:
--------------------------------------------------------------------------------
1 | instanceName = $instanceName;
26 | $this->selfEdit = $selfEdit;
27 | }
28 |
29 | /**
30 | * Intercepts any call to any function and forwards it to the proxy.
31 | *
32 | * @param string $methodName
33 | * @param array $arguments
34 | */
35 | public function __call($methodName, $arguments) {
36 | $postArray = array("instance"=>$this->instanceName, "method"=>$methodName, "args"=>serialize($arguments));
37 |
38 | $url = MoufReflectionProxy::getLocalUrlToProject()."src/direct/proxy.php";
39 |
40 | $response = MoufReflectionProxy::performRequest($url, $postArray);
41 |
42 | $obj = @unserialize($response);
43 |
44 | if ($obj === false) {
45 | // Is this an unserialized "false" or an error in unserialization?
46 | if ($response != serialize(false)) {
47 | throw new MoufException("Unable to unserialize message:\n".$response."\n
URL in error: ".plainstring_to_htmlprotected($url)."");
48 | }
49 | }
50 |
51 | return $obj;
52 | }
53 | }
--------------------------------------------------------------------------------
/src/Mouf/MissingDependencyException.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf;
11 | use Interop\Container\Exception\ContainerException;
12 |
13 | /**
14 | * MissingDependencyException are thrown by the Mouf framework when the user
15 | * request an instance that has a dependency on an instance that does not exist.
16 | *
17 | */
18 | class MissingDependencyException extends MoufException implements ContainerException {
19 |
20 | /**
21 | * The name of the instance that was not found.
22 | *
23 | * @var string
24 | */
25 | private $instanceName;
26 |
27 | public function __construct($msg, $code = null, $instanceName = null, \Exception $causeException = null) {
28 | parent::__construct($msg, $code, $causeException);
29 | $this->instanceName = $instanceName;
30 | }
31 |
32 | /**
33 | * Returns the name of the instance that was not found.
34 | *
35 | * @return string
36 | */
37 | public function getMissingInstanceName() {
38 | return $this->instanceName;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Mouf/MoufContainerException.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf;
11 |
12 | /**
13 | * Mouf Container Exceptions are thrown by the Mouf framework if something goes wrong in the container.
14 | *
15 | */
16 | class MoufContainerException extends MoufException {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/Mouf/MoufException.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf;
11 |
12 | /**
13 | * Mouf Exception are thrown by the Mouf framework if something goes wrong.
14 | *
15 | */
16 | class MoufException extends \Exception {
17 |
18 | }
19 | ?>
--------------------------------------------------------------------------------
/src/Mouf/MoufInstanceNotFoundException.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf;
11 | use Interop\Container\Exception\NotFoundException;
12 |
13 | /**
14 | * MoufInstanceNotFoundException are thrown by the Mouf framework when the user
15 | * request an instance that is not defined.
16 | *
17 | */
18 | class MoufInstanceNotFoundException extends MoufException implements NotFoundException {
19 |
20 | /**
21 | * The name of the instance that was not found.
22 | *
23 | * @var string
24 | */
25 | private $instanceName;
26 |
27 | public function __construct($msg, $code = null, $instanceName = null, \Exception $causeException = null) {
28 | parent::__construct($msg, $code, $causeException);
29 | $this->instanceName = $instanceName;
30 | }
31 |
32 | /**
33 | * Returns the name of the instance that was not found.
34 | *
35 | * @return string
36 | */
37 | public function getMissingInstanceName() {
38 | return $this->instanceName;
39 | }
40 | }
41 | ?>
--------------------------------------------------------------------------------
/src/Mouf/MoufNetworkException.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf;
11 |
12 | /**
13 | * MoufNetworkException are thrown by the Mouf framework when the system tries and fails to access a remote repository to view/download packages.
14 | *
15 | */
16 | class MoufNetworkException extends MoufException {
17 |
18 |
19 | }
20 | ?>
--------------------------------------------------------------------------------
/src/Mouf/MoufSearchService.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf;
11 |
12 | /**
13 | * This class is in charge for referencing all the services that can be searched in Mouf
14 | * using full-text search.
15 | *
16 | * @author David
17 | * @Component
18 | */
19 | class MoufSearchService {
20 | /**
21 | * An array of URLs that will be queried in Ajax to return search results.
22 | * The URLs should accept the "query" and "selfedit" parameters, and return direct HTML.
23 | *
24 | * @Property
25 | * @Compulsory
26 | * @var array
27 | */
28 | public $searchableServices = array();
29 | }
--------------------------------------------------------------------------------
/src/Mouf/MoufSearchable.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf;
11 |
12 | /**
13 | * This interface should be implemented by any controller that can be accessed for full-text search.
14 | *
15 | * @author David
16 | */
17 | interface MoufSearchable {
18 |
19 | /**
20 | * Outputs HTML that will be displayed in the search result screen.
21 | * If there are no results, this should not return anything.
22 | *
23 | * @Action
24 | * @param string $query The full-text search query performed.
25 | * @param string $selfedit Whether we are in self-edit mode or not.
26 | */
27 | public function search($query, $selfedit = "false");
28 |
29 | /**
30 | * Returns the name of the search module.
31 | * This name in displayed when the search is pending.
32 | *
33 | * @return string
34 | */
35 | public function getSearchModuleName();
36 | }
--------------------------------------------------------------------------------
/src/Mouf/MoufTypeParserException.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf;
11 |
12 | /**
13 | * An exception thrown when an error occured while parsing a "type" string.
14 | *
15 | * @author David Négrier
16 | */
17 | class MoufTypeParserException extends MoufException {
18 | }
19 |
20 | ?>
--------------------------------------------------------------------------------
/src/Mouf/Reflection/MoufAnnotationHelper.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Reflection;
11 |
12 | /**
13 | * A utility class specialized in parsing annotations.
14 | *
15 | */
16 | class MoufAnnotationHelper {
17 |
18 | /**
19 | * Returns a list from the string. The string can be specified as "toto", "tata", "titi"
20 | *
21 | * @param string $value
22 | * @return array
23 | */
24 | public static function getValueAsList($value) {
25 | $tokens = token_get_all('
--------------------------------------------------------------------------------
/src/Mouf/Reflection/MoufAnnotationInterface.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Reflection;
11 |
12 | /**
13 | * Implement this interface if you want one of your components to be exposed as an annotation.
14 | * When requesting the annotations using the getAnnotations method, Mouf will
15 | * associate the @fooBar annotation to the instance whose name is "fooBar".
16 | *
17 | * Please note that Mouf will return a CLONE of the annotation instance, and not the
18 | * annotation instance itself.
19 | */
20 | interface MoufAnnotationInterface
21 | {
22 | /**
23 | * Sets the parameters stored in this annotation.
24 | * This function is automatically called just after the annotation is created.
25 | *
26 | * @param string $value
27 | */
28 | function setValue($value);
29 | }
30 | ?>
--------------------------------------------------------------------------------
/src/Mouf/Reflection/MoufReflectionMethodInterface.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Reflection;
11 |
12 | /**
13 | * The interface implemented by objects representing a method.
14 | *
15 | * @author David Negrier
16 | */
17 | interface MoufReflectionMethodInterface {
18 | public function getName();
19 |
20 | public function isPublic();
21 |
22 | public function isPrivate();
23 |
24 | public function isProtected();
25 |
26 | public function isStatic();
27 |
28 | public function isFinal();
29 |
30 | public function isConstructor();
31 |
32 | public function isAbstract();
33 |
34 | /**
35 | * Returns the full comment for the method
36 | *
37 | * @return string
38 | */
39 | public function getDocComment();
40 |
41 | /**
42 | * Returns the number of declared annotations of type $annotationName in the class comment.
43 | *
44 | * @param string $annotationName
45 | * @return int
46 | */
47 | public function hasAnnotation($annotationName);
48 |
49 | /**
50 | * Returns the annotation objects associated to $annotationName in an array.
51 | * For instance, if there is one annotation "@Filter toto", there will be an array of one element.
52 | * The element will contain an object of type FilterAnnotation. If the class FilterAnnotation is not defined,
53 | * a string is returned instead of an object.
54 | *
55 | * @param string $annotationName
56 | * @return array<$objects>
57 | */
58 | public function getAnnotations($annotationName);
59 |
60 | /**
61 | * Returns a map associating the annotation title to an array of objects representing the annotation.
62 | *
63 | * @var array("annotationClass"=>array($annotationObjects))
64 | */
65 | public function getAllAnnotations();
66 |
67 | /**
68 | * returns the class that declares this method
69 | *
70 | * @return MoufReflectionClass
71 | */
72 | public function getDeclaringClass();
73 | }
--------------------------------------------------------------------------------
/src/Mouf/Reflection/MoufReflectionParameterInterface.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Reflection;
11 |
12 | /**
13 | * The interface implemented by objects representing a parameter.
14 | *
15 | * @author David Negrier
16 | */
17 | interface MoufReflectionParameterInterface {
18 | /**
19 | * Returns the property name
20 | *
21 | * @return string
22 | */
23 | public function getName();
24 |
25 | /**
26 | * Returns the default value
27 | *
28 | * @return mixed
29 | */
30 | public function getDefaultValue();
31 |
32 | /**
33 | * Returns the declaring function containing this parameter.
34 | *
35 | * @return MoufReflectionMethodInterface
36 | */
37 | public function getDeclaringFunction();
38 |
39 | /**
40 | * Returns the class of the parameter (if any)
41 | *
42 | * @return string
43 | */
44 | public function getType();
45 |
46 | /**
47 | * Returns the position of the parameter in the parameters list (starting 0)
48 | *
49 | * @return number
50 | */
51 | public function getPosition();
52 | }
--------------------------------------------------------------------------------
/src/Mouf/Reflection/MoufReflectionPropertyInterface.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 | namespace Mouf\Reflection;
11 |
12 | /**
13 | * The interface implemented by objects representing a property (with or without a @Property annotation).
14 | *
15 | * @author David Negrier
16 | */
17 | interface MoufReflectionPropertyInterface {
18 | /**
19 | * Returns the property name
20 | *
21 | * @return string
22 | */
23 | public function getName();
24 |
25 | /**
26 | * Returns the default value
27 | *
28 | * @return mixed
29 | */
30 | public function getDefault();
31 |
32 | /**
33 | * Returns the full comment for the method
34 | *
35 | * @return string
36 | */
37 | public function getDocComment();
38 |
39 | /**
40 | * Returns the MoufPhpDocComment instance
41 | *
42 | * @return MoufPhpDocComment
43 | */
44 | public function getMoufPhpDocComment();
45 |
46 | /**
47 | * Returns the number of declared annotations of type $annotationName in the class comment.
48 | *
49 | * @param string $annotationName
50 | * @return int
51 | */
52 | public function hasAnnotation($annotationName);
53 |
54 | /**
55 | * Returns the annotation objects associated to $annotationName in an array.
56 | * For instance, if there is one annotation "@Filter toto", there will be an array of one element.
57 | * The element will contain an object of type FilterAnnotation. If the class FilterAnnotation is not defined,
58 | * a string is returned instead of an object.
59 | *
60 | * @param string $annotationName
61 | * @return array<$objects>
62 | */
63 | public function getAnnotations($annotationName);
64 |
65 | /**
66 | * Returns a map associating the annotation title to an array of objects representing the annotation.
67 | *
68 | * @var array("annotationClass"=>array($annotationObjects))
69 | */
70 | public function getAllAnnotations();
71 |
72 | /**
73 | * Returns the declaring class for this property
74 | *
75 | * @return MoufReflectionClassInterface
76 | */
77 | public function getDeclaringClass();
78 |
79 | /**
80 | * Tells if the property is a public one
81 | */
82 | public function isPublic();
83 |
84 | /**
85 | * Tells if the property is a private one
86 | */
87 | public function isPrivate();
88 |
89 | /**
90 | * Tells if the protected is a public one
91 | */
92 | public function isProtected();
93 |
94 | /**
95 | * Tells if the property is static
96 | */
97 | public function isStatic();
98 | }
--------------------------------------------------------------------------------
/src/Mouf/UniqueIdService.php:
--------------------------------------------------------------------------------
1 | get('computerUniqueId');
20 |
21 | if (!$id) {
22 | // Let's get the Mac address from this computer
23 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
24 | ob_start();
25 | system('ipconfig /all'); //Execute external program to display output
26 | $output=ob_get_clean();
27 | } else {
28 | ob_start();
29 | system('ifconfig'); //Execute external program to display output
30 | $output=ob_get_clean();
31 | }
32 |
33 | preg_match('/..:..:..:..:..:../', $output, $matches);
34 | if (isset($matches[0])) {
35 | $macAddress = $matches[0];
36 | } else {
37 | $macAddress = '';
38 | }
39 |
40 | $branch = exec('git rev-parse --abbrev-ref HEAD');
41 |
42 | $totalString = $macAddress.__DIR__.$branch;
43 | $md5 = md5($totalString);
44 |
45 | // Only keep the first 4 characters to keep the ID short.
46 | $id = substr($md5, 0, 4);
47 |
48 | $moufCache->set('computerUniqueId', $id);
49 | }
50 |
51 | return $id;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Mouf/Validator/CheckConstructorLoopValidator.php:
--------------------------------------------------------------------------------
1 | checkConstructorLoop();
23 | return new MoufValidatorResult(MoufValidatorResult::SUCCESS, "No loop detected in constructor arguments.");
24 | }
25 | catch(MoufException $e) {
26 | return new MoufValidatorResult(MoufValidatorResult::ERROR, ''.$e->getMessage().'
27 | Please check yours instances to refactor your code and change your code architecture.
28 | The other ugly solution is to make a setter for one of this parameter to remove it from constructor argument');
29 | }
30 | }
31 |
32 | }
--------------------------------------------------------------------------------
/src/direct/get_class.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 |
12 | use Mouf\Reflection\MoufReflectionClass;
13 |
14 | ini_set('display_errors', 1);
15 | // Add E_ERROR to error reporting it it is not already set
16 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
17 |
18 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
19 | define('ROOT_URL', $_SERVER['BASE']."/../../../");
20 |
21 | require_once '../../../../../mouf/Mouf.php';
22 | $mouf_base_path = ROOT_PATH;
23 | $selfEdit = false;
24 | } else {
25 | define('ROOT_URL', $_SERVER['BASE']."/");
26 |
27 | require_once '../../mouf/Mouf.php';
28 | $mouf_base_path = ROOT_PATH."mouf/";
29 | $selfEdit = true;
30 | }
31 |
32 | // Note: checking rights is done after loading the required files because we need to open the session
33 | // and only after can we check if it was not loaded before loading it ourselves...
34 | require_once 'utils/check_rights.php';
35 |
36 | //$res = MoufManager::getMoufManager()->findInstances($_REQUEST["class"]);
37 | $class = new MoufReflectionClass($_REQUEST["class"]);
38 |
39 | if (isset($_REQUEST["encode"]) && $_REQUEST["encode"]=="json") {
40 | $classArray = array();
41 | $classArray[$_REQUEST["class"]] = $class->toJson();
42 | while ($class->getParentClass() != null) {
43 | $class = $class->getParentClass();
44 | $classArray[$class->getName()] = $class->toJson();
45 | }
46 |
47 | $response = array("classes" => $classArray);
48 | echo json_encode($response);
49 | } else {
50 | echo $class->toXml();
51 | }
52 |
53 | ?>
--------------------------------------------------------------------------------
/src/direct/get_class_map.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /**
12 | * Analyses all included PHP files to detect whether one is not behaving correctly (outputing some text, which is strictly forbidden)
13 | */
14 |
15 | use Mouf\Composer\ComposerService;
16 |
17 | // Disable output buffering
18 | while (ob_get_level() != 0) {
19 | ob_end_clean();
20 | }
21 |
22 | ini_set('display_errors', 1);
23 | // Add E_ERROR to error reporting if it is not already set
24 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
25 |
26 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
27 | define('ROOT_URL', $_SERVER['BASE']."/../../../");
28 |
29 | require_once '../../../../../mouf/Mouf.php';
30 | $mouf_base_path = ROOT_PATH;
31 | $selfEdit = false;
32 |
33 | } else {
34 | if (isset($_SERVER['BASE'])) {
35 | define('ROOT_URL', $_SERVER['BASE']."/");
36 | } else {
37 | define('ROOT_URL', "/");
38 | }
39 |
40 | require_once '../../mouf/Mouf.php';
41 | $mouf_base_path = ROOT_PATH."mouf/";
42 | $selfEdit = true;
43 | }
44 |
45 | // Note: checking rights is done after loading the required files because we need to open the session
46 | // and only after can we check if it was not loaded before loading it ourselves...
47 | require_once 'utils/check_rights.php';
48 |
49 | $mode = $_REQUEST["mode"];
50 |
51 | $composerService = new ComposerService($selfEdit);
52 | $classMap = $composerService->getClassMap($mode);
53 |
54 | $file = $line = null;
55 | $sent = headers_sent($file, $line);
56 | if ($sent){
57 | throw new \Mouf\MoufException("Error while calling get_class_map : output started at $file on line $line");
58 | }
59 |
60 | $encode = "php";
61 | if (isset($_REQUEST["encode"]) && $_REQUEST["encode"]="json") {
62 | $encode = "json";
63 | }
64 |
65 | if ($encode == "php") {
66 | echo serialize($classMap);
67 | } elseif ($encode == "json") {
68 | echo json_encode($classMap);
69 | } else {
70 | echo "invalid encode parameter";
71 | }
72 |
--------------------------------------------------------------------------------
/src/direct/get_components_list.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /**
12 | * Returns a serialized string representing the array for all components declares (classes with the @Component annotation)
13 | */
14 |
15 |
16 | ini_set('display_errors', 1);
17 | // Add E_ERROR to error reporting it it is not already set
18 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
19 |
20 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
21 | define('ROOT_URL', $_SERVER['BASE']."/../../../");
22 |
23 | require_once '../../Mouf.php';
24 | } else {
25 | define('ROOT_URL', $_SERVER['BASE']."/");
26 |
27 | require_once '../MoufManager.php';
28 | MoufManager::initMoufManager();
29 | require_once '../../MoufUniversalParameters.php';
30 | require_once '../MoufAdmin.php';
31 | }
32 | require_once '../Moufspector.php';
33 |
34 | // Note: checking rights is done after loading the required files because we need to open the session
35 | // and only after can we check if it was not loaded before loading it ourselves...
36 | require_once 'utils/check_rights.php';
37 |
38 | MoufManager::getMoufManager()->forceAutoload();
39 |
40 | $type = null;
41 | if (isset($_REQUEST["type"])) {
42 | $type = $_REQUEST["type"];
43 | }
44 |
45 | $encode = "php";
46 | if (isset($_REQUEST["encode"]) && $_REQUEST["encode"]="json") {
47 | $encode = "json";
48 | }
49 |
50 | if ($encode == "php") {
51 | echo serialize(Moufspector::getComponentsList($type));
52 | } elseif ($encode == "json") {
53 | echo json_encode(Moufspector::getComponentsList($type));
54 | } else {
55 | echo "invalid encode parameter";
56 | }
57 | ?>
--------------------------------------------------------------------------------
/src/direct/get_defined_constants.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 |
12 |
13 | ini_set('display_errors', 1);
14 | // Add E_ERROR to error reporting it it is not already set
15 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
16 |
17 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
18 | $fileName = dirname(__FILE__)."/../../../../../config.php";
19 | } else {
20 | $fileName = dirname(__FILE__)."/../../config.php";
21 | }
22 |
23 | // Note: checking rights is done after loading the required files because we need to open the session
24 | // and only after can we check if it was not loaded before loading it ourselves...
25 | require_once 'utils/check_rights.php';
26 |
27 |
28 | $constants_list = null;
29 |
30 | // If no config file exist, there is no constants defined. Let's return an empty list.
31 | if (!file_exists($fileName)) {
32 | echo serialize(array());
33 | exit;
34 | }
35 |
36 | require_once $fileName;
37 |
38 | $encode = "php";
39 | if (isset($_REQUEST["encode"]) && $_REQUEST["encode"]="json") {
40 | $encode = "json";
41 | }
42 |
43 | $allConstants = get_defined_constants(true);
44 |
45 | // No custom constants? Let's return an empty list.
46 | if (!isset($allConstants['user'])) {
47 | echo serialize(array());
48 | exit;
49 | }
50 |
51 | // Some custom constants? They come from config.php.
52 | // Let's return those.
53 | //echo serialize($allConstants['user']);
54 |
55 | if ($encode == "php") {
56 | echo serialize($allConstants['user']);
57 | } elseif ($encode == "json") {
58 | echo json_encode($allConstants['user']);
59 | } else {
60 | echo "invalid encode parameter";
61 | }
62 |
63 | ?>
--------------------------------------------------------------------------------
/src/direct/get_enhanced_components_list.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /**
12 | * Returns a serialized string representing the array for all components declarations (classes with the @Component annotation),
13 | * along additional interesting infos (subclasses, name of the declaration file, etc...)
14 | */
15 |
16 |
17 | use Mouf\Moufspector;
18 |
19 | use Mouf\MoufManager;
20 |
21 | ini_set('display_errors', 1);
22 | // Add E_ERROR to error reporting it it is not already set
23 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
24 |
25 | // Disable output buffering
26 | while (ob_get_level() != 0) {
27 | ob_end_clean();
28 | }
29 |
30 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
31 | define('ROOT_URL', $_SERVER['BASE']."/../../../");
32 |
33 | require_once '../../../../../mouf/Mouf.php';
34 | } else {
35 | define('ROOT_URL', $_SERVER['BASE']."/");
36 |
37 | require_once '../../mouf/Mouf.php';
38 | /*require_once '../MoufManager.php';
39 | MoufManager::initMoufManager();
40 | require_once '../../MoufUniversalParameters.php';
41 | require_once '../MoufAdmin.php';*/
42 | }
43 | //require_once '../Moufspector.php';
44 |
45 | // Note: checking rights is done after loading the required files because we need to open the session
46 | // and only after can we check if it was not loaded before loading it ourselves...
47 | require_once 'utils/check_rights.php';
48 |
49 | //MoufManager::getMoufManager()->forceAutoload();
50 |
51 | $file=null;
52 | $line=null;
53 | $isSent = headers_sent($file, $line);
54 |
55 | if ($isSent) {
56 | echo "\nError! Output started on line ".$line." in file ".$file."";
57 | exit;
58 | }
59 |
60 | $type = null;
61 | if (isset($_REQUEST["type"])) {
62 | $type = $_REQUEST["type"];
63 | }
64 |
65 | $encode = "php";
66 | if (isset($_REQUEST["encode"]) && $_REQUEST["encode"]="json") {
67 | $encode = "json";
68 | }
69 |
70 | if ($encode == "php") {
71 | echo serialize(Moufspector::getEnhancedComponentsList($type, $_REQUEST["selfedit"]=="true"));
72 | } elseif ($encode == "json") {
73 | echo json_encode(Moufspector::getEnhancedComponentsList($type, $_REQUEST["selfedit"]=="true"));
74 | } else {
75 | echo "invalid encode parameter";
76 | }
77 | ?>
--------------------------------------------------------------------------------
/src/direct/get_instance_details.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /**
12 | * Returns a serialized string representing an instance.
13 | */
14 |
15 | use Mouf\MoufManager;
16 |
17 | ini_set('display_errors', 1);
18 | // Add E_ERROR to error reporting it it is not already set
19 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
20 |
21 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
22 | define('ROOT_URL', $_SERVER['BASE']."/../../../");
23 |
24 | require_once '../../../../../mouf/Mouf.php';
25 | } else {
26 | define('ROOT_URL', $_SERVER['BASE']."/");
27 |
28 | require_once '../../mouf/Mouf.php';
29 | }
30 |
31 | // Note: checking rights is done after loading the required files because we need to open the session
32 | // and only after can we check if it was not loaded before loading it ourselves...
33 | require_once 'utils/check_rights.php';
34 |
35 | $encode = "php";
36 | if (isset($_REQUEST["encode"]) && $_REQUEST["encode"]=="json") {
37 | $encode = "json";
38 | }
39 |
40 | $moufManager = MoufManager::getMoufManager();
41 | // FIXME: the getInstanceDescriptor is calling the getClassDescriptor that itself is making a CURL call.
42 | // In this case, the CURL call is not needed since the getInstanceDescriptor and the getClassDescriptor are
43 | // in the same scope.
44 | $instanceDescriptor = $moufManager->getInstanceDescriptor($_REQUEST["name"]);
45 |
46 |
47 | $response = array();
48 |
49 | $response["instances"][$instanceDescriptor->getIdentifierName()] = $instanceDescriptor->toJson();
50 |
51 |
52 | // We send back class data with instance data... this saves one request.
53 | // Now, let's embed the class and all the parents with this instance.
54 | if ($instanceDescriptor->getClassName()) {
55 | $classDescriptor = $instanceDescriptor->getClassDescriptor();
56 | $classArray = array();
57 | do {
58 | $classArray[$classDescriptor->getName()] = $classDescriptor->toJson();
59 | $classDescriptor = $classDescriptor->getParentClass();
60 | } while ($classDescriptor != null);
61 | $response["classes"] = $classArray;
62 | }
63 |
64 | if ($encode == "php") {
65 | echo serialize($response);
66 | } elseif ($encode == "json") {
67 | header("Content-type: application/json");
68 | echo json_encode($response);
69 | } else {
70 | echo "invalid encode parameter";
71 | }
72 |
73 | ?>
--------------------------------------------------------------------------------
/src/direct/get_instances.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | use Mouf\MoufManager;
12 |
13 | /**
14 | * Returns a serialized string representing the array for all components declares (classes with the @Component annotation)
15 | */
16 |
17 |
18 | ini_set('display_errors', 1);
19 | // Add E_ERROR to error reporting it it is not already set
20 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
21 |
22 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
23 | define('ROOT_URL', $_SERVER['BASE']."/../../../");
24 |
25 | require_once '../../../../../mouf/Mouf.php';
26 | $mouf_base_path = ROOT_PATH;
27 | $selfEdit = false;
28 | } else {
29 | define('ROOT_URL', $_SERVER['BASE']."/");
30 |
31 | require_once '../../mouf/Mouf.php';
32 | $mouf_base_path = ROOT_PATH."mouf/";
33 | $selfEdit = true;
34 | }
35 |
36 | // Note: checking rights is done after loading the required files because we need to open the session
37 | // and only after can we check if it was not loaded before loading it ourselves...
38 | require_once 'utils/check_rights.php';
39 |
40 | $encode = "php";
41 | if (isset($_REQUEST["encode"]) && $_REQUEST["encode"]=="json") {
42 | $encode = "json";
43 | }
44 |
45 | if ($encode == "php") {
46 | echo serialize(MoufManager::getMoufManager()->findInstances($_REQUEST["class"]));
47 | } elseif ($encode == "json") {
48 | echo json_encode(MoufManager::getMoufManager()->findInstances($_REQUEST["class"]));
49 | } else {
50 | echo "invalid encode parameter";
51 | }
52 |
53 | ?>
--------------------------------------------------------------------------------
/src/direct/get_properties_for_class.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 |
12 |
13 | ini_set('display_errors', 1);
14 | // Add E_ERROR to error reporting it it is not already set
15 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
16 |
17 | require_once '../../Mouf.php';
18 | require_once '../Moufspector.php';
19 |
20 | // Note: checking rights is done after loading the required files because we need to open the session
21 | // and only after can we check if it was not loaded before loading it ourselves...
22 | require_once 'utils/check_rights.php';
23 |
24 | $res = MoufManager::getMoufManager()->findInstances($_REQUEST["class"]);
25 |
26 |
27 | ?>
--------------------------------------------------------------------------------
/src/direct/get_source_file.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /**
12 | * Returns the source code of a file passed in parameter.
13 | */
14 |
15 |
16 | ini_set('display_errors', 1);
17 | // Add E_ERROR to error reporting it it is not already set
18 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
19 |
20 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
21 | define('ROOT_URL', $_SERVER['BASE']."/../../../");
22 |
23 | require_once '../../../../../mouf/Mouf.php';
24 | $selfedit = false;
25 | } else {
26 | define('ROOT_URL', $_SERVER['BASE']."/");
27 |
28 | require_once '../../mouf/Mouf.php';
29 | $selfedit = true;
30 | }
31 |
32 | // Note: checking rights is done after loading the required files because we need to open the session
33 | // and only after can we check if it was not loaded before loading it ourselves...
34 | require_once 'utils/check_rights.php';
35 |
36 | $file = $_REQUEST["file"];
37 |
38 | if (strpos($file, "..") !== false) {
39 | echo "Error, invalid file name";
40 | die("Error, invalid file name");
41 | }
42 |
43 | readfile(ROOT_PATH.$file);
44 |
--------------------------------------------------------------------------------
/src/direct/install_file.php:
--------------------------------------------------------------------------------
1 |
12 | *
13 | * For the full copyright and license information, please view the LICENSE.txt
14 | * file that was distributed with this source code.
15 | */
16 |
17 | // This validator checks that no installation step is pending.
18 | use Mouf\MoufUtils;
19 |
20 |
21 | ini_set('display_errors', 1);
22 | // Add E_ERROR to error reporting it it is not already set
23 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
24 |
25 | define('ROOT_URL', $_SERVER['BASE']."/");
26 |
27 | require_once '../../mouf/Mouf.php';
28 |
29 |
30 | // Note: checking rights is done after loading the required files because we need to open the session
31 | // and only after can we check if it was not loaded before loading it ourselves...
32 | //require_once 'utils/check_rights.php';
33 | MoufUtils::checkRights();
34 |
35 | MoufAdmin::getSessionManager()->write_close();
36 |
37 |
38 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
39 | $selfEdit = false;
40 | } else {
41 | $selfEdit = true;
42 | }
43 |
44 | $installService = new ComposerInstaller($selfEdit == 'true');
45 | $installs = $installService->getInstallTasks();
46 | //var_dump($installs);exit;
47 | $countNbTodo = 0;
48 | foreach ($installs as $installTask) {
49 | if ($installTask->getStatus() == AbstractInstallTask::STATUS_TODO) {
50 | $countNbTodo++;
51 | }
52 | }
53 |
54 | $jsonObj = array();
55 | if ($countNbTodo == 0) {
56 | $jsonObj['code'] = "ok";
57 | $jsonObj['html'] = "No pending install tasks to execute.";
58 | } else {
59 | $jsonObj['code'] = "warn";
60 | $jsonObj['html'] = "$countNbTodo pending install action(s) detected.
Run install tasks
";
61 | }
62 |
63 | echo json_encode($jsonObj);
64 | ?>
--------------------------------------------------------------------------------
/src/direct/proxy.php:
--------------------------------------------------------------------------------
1 | getInstance($instance);
64 | $result = call_user_func_array(array($instanceObj, $method), $arguments);
65 | } else {
66 | $result = call_user_func_array(array($class, $method), $arguments);
67 | }
68 |
69 | if ($encode == "php") {
70 | echo serialize($result);
71 | } elseif ($encode == "json") {
72 | echo json_encode($result);
73 | }
74 |
75 | ?>
76 |
--------------------------------------------------------------------------------
/src/direct/purge_code_cache.php:
--------------------------------------------------------------------------------
1 | purgeAll();
26 |
27 | exit;
28 | ?>
--------------------------------------------------------------------------------
/src/direct/reset.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | // Rewrites the MoufRequire file from the MoufComponents file, and the admin too.
12 |
13 |
14 | ini_set('display_errors', 1);
15 | // Add E_ERROR to error reporting it it is not already set
16 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
17 |
18 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
19 | //require_once '../../Mouf.php';
20 | require_once '../../MoufComponents.php';
21 | require_once '../../MoufUniversalParameters.php';
22 | } else {
23 | require_once '../MoufManager.php';
24 | MoufManager::initMoufManager();
25 | require_once '../../MoufUniversalParameters.php';
26 | MoufManager::switchToHidden();
27 | //require_once '../MoufAdmin.php';
28 | require_once '../MoufAdminComponents.php';
29 | }
30 |
31 | require_once '../MoufPackageManager.php';
32 | require_once 'utils/check_rights.php';
33 |
34 | MoufManager::getMoufManager()->rewriteMouf();
35 |
36 | echo "Rewrite done.";
--------------------------------------------------------------------------------
/src/direct/run_install_class.php:
--------------------------------------------------------------------------------
1 |
8 | *
9 | * For the full copyright and license information, please view the LICENSE.txt
10 | * file that was distributed with this source code.
11 | */
12 |
13 | /*
14 | * This file is in charge of running the install process for one class.
15 | */
16 |
17 | $rootUrl = $_REQUEST['root_url'];
18 | $installPackage = $_REQUEST['install_package'];
19 | $selfedit = $_REQUEST['selfedit'];
20 |
21 | define('ROOT_URL', $rootUrl);
22 |
23 | if ($selfedit == "true") {
24 | if (is_dir(__DIR__.'/../../vendor/'.$installPackage)) {
25 | chdir(__DIR__.'/../../vendor/'.$installPackage);
26 | } else {
27 | // The important part is to be in a subdirectory of /vendor/mouf/mouf
28 | chdir(__DIR__);
29 | }
30 | } else {
31 | if (is_dir(__DIR__.'/../../../../../vendor/'.$installPackage)) {
32 | chdir(__DIR__.'/../../../../../vendor/'.$installPackage);
33 | } else {
34 | // The important part is to be in a subdirectory of ROOT_PATH and not in /vendor/mouf/mouf
35 | chdir(__DIR__.'/../../../');
36 | }
37 | }
38 |
39 | require_once __DIR__."/../../../../autoload.php";
40 | //require_once __DIR__."/../../../../../mouf/Mouf.php";
41 |
42 | use Mouf\Actions\InstallUtils;
43 | use Mouf\MoufManager;
44 | use Mouf\MoufUtils;
45 |
46 | // Let's init Mouf
47 | InstallUtils::init(InstallUtils::$INIT_APP);
48 |
49 | // Let's create the instance
50 | $moufManager = MoufManager::getMoufManager();
51 |
52 | $name = $_REQUEST['class'];
53 |
54 | if (!class_exists($name)) {
55 | throw new MoufException("Unable to find class '".$name."'.");
56 | }
57 | if (!is_a($name, 'Mouf\\Installer\\PackageInstallerInterface', true)) {
58 | throw new MoufException("The class '".$name."' must implement interface Mouf\\Installer\\PackageInstallerInterface");
59 | }
60 |
61 | $name::install($moufManager);
62 |
63 | // Finally, let's continue the install
64 | InstallUtils::continueInstall();
65 | ?>
66 |
--------------------------------------------------------------------------------
/src/direct/test_connection.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /**
12 | * This file should be included at the beginning of each file of the "/direct" folder.
13 | * It checks that the rights are ok.
14 | * The user is allowed access to the file if he is logged, or if he is requesting the file from localhost
15 | * (because it could be a request from Mouf itself via Curl, and therefore not logged).
16 | */
17 |
18 | $moufUI = getenv('MOUF_UI');
19 | if ($moufUI !== false) {
20 | $moufUI = (bool) $moufUI;
21 | if (!$moufUI) {
22 | header('HTTP/1.1 403 Forbidden');
23 | echo 'Error! Access to Mouf UI is forbidden on this environment (env variable MOUF_UI is set to 0)';
24 | exit;
25 | }
26 | }
27 | unset($moufUI);
28 |
29 | // TODO: remove this condition when everything is migrated to the new cookie propagation method.
30 | if ($_SERVER['REMOTE_ADDR'] == $_SERVER['SERVER_ADDR'] /*|| $_SERVER['REMOTE_ADDR'] == '::1'*/) {
31 | return;
32 | }
33 |
34 | if (!isset($_SESSION)) {
35 | session_start();
36 | }
37 |
38 | if (!isset($_SESSION['MoufMoufUserId'])) {
39 | header('HTTP/1.1 403 Forbidden');
40 | echo 'Error! You must be logged in to access this screen';
41 | exit;
42 | }
43 |
44 | ?>
--------------------------------------------------------------------------------
/src/direct/validate.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /**
12 | * Returns a serialized string representing the list of instances implementing the MoufValidatorInterface
13 | * and classes implementing the MoufStaticValidatorInterface
14 | */
15 |
16 |
17 | use Mouf\Reflection\MoufReflectionClass;
18 |
19 | use Mouf\Moufspector;
20 |
21 | use Mouf\MoufManager;
22 |
23 | ini_set('display_errors', 1);
24 | // Add E_ERROR to error reporting it it is not already set
25 | error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
26 |
27 | if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
28 | define('ROOT_URL', $_SERVER['BASE']."/../../../");
29 |
30 | // Force loading autoload from mouf's version of PhpParser
31 | require_once __DIR__.'/../../vendor/nikic/php-parser/lib/bootstrap.php';
32 |
33 | require_once '../../../../../mouf/Mouf.php';
34 | $mouf_base_path = ROOT_PATH;
35 | $selfEdit = false;
36 |
37 | } else {
38 | define('ROOT_URL', $_SERVER['BASE']."/");
39 |
40 | require_once '../../mouf/Mouf.php';
41 | $mouf_base_path = ROOT_PATH."mouf/";
42 | $selfEdit = true;
43 | }
44 |
45 | // Note: checking rights is done after loading the required files because we need to open the session
46 | // and only after can we check if it was not loaded before loading it ourselves...
47 | require_once 'utils/check_rights.php';
48 |
49 | if (isset($_REQUEST["class"])) {
50 | $className = $_REQUEST["class"];
51 |
52 | $result = $className::validateClass();
53 | } else {
54 | $instanceName = $_REQUEST["instance"];
55 |
56 | $moufManager = MoufManager::getMoufManager();
57 | $instance = $moufManager->getInstance($instanceName);
58 | /* @var $instance Mouf\Validator\MoufValidatorInterface */
59 | $result = $instance->validateInstance();
60 | }
61 |
62 | $response = $result->toJson();
63 |
64 | $encode = "php";
65 | if (isset($_REQUEST["encode"]) && $_REQUEST["encode"]=="json") {
66 | $encode = "json";
67 | }
68 |
69 | if ($encode == "php") {
70 | echo serialize($response);
71 | } elseif ($encode == "json") {
72 | header("Content-type: application/json");
73 | echo json_encode($response);
74 | } else {
75 | echo "invalid encode parameter";
76 | }
77 |
78 | ?>
79 |
--------------------------------------------------------------------------------
/src/direct/validate_code.php:
--------------------------------------------------------------------------------
1 | "success",
51 | "data" => []
52 | ];
53 | try {
54 | CodeValidatorService::validateCode($code);
55 | } catch (PhpParser\Error $e) {
56 | $result = [
57 | "status" => "fail",
58 | "data" => [
59 | "line" => $e->getRawLine(),
60 | "message" => $e->getRawMessage()
61 | ]
62 | ];
63 | }
64 |
65 | if ($encode == "php") {
66 | echo serialize($result);
67 | } elseif ($encode == "json") {
68 | echo json_encode($result);
69 | }
70 |
71 | ?>
72 |
--------------------------------------------------------------------------------
/src/load.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | session_start();
12 | ?>
--------------------------------------------------------------------------------
/src/mouf_router.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE.txt
8 | * file that was distributed with this source code.
9 | */
10 |
11 | // Let's load the Mouf file, and the MoufAdmin file.
12 | // The MoufAdmin will replace the Mouf configuration file.
13 | if (file_exists(dirname(__FILE__).'/../MoufComponents.php')) {
14 | require_once dirname(__FILE__).'/../MoufComponents.php';
15 | }
16 | require_once dirname(__FILE__).'/../MoufUniversalParameters.php';
17 |
18 | MoufManager::switchToHidden();
19 | require_once 'MoufAdmin.php';
20 | if (isset($_REQUEST['selfedit']) && $_REQUEST['selfedit']=="true") {
21 | require_once 'MoufAdminUI.php';
22 | } else {
23 | // Check file existence just to be sure.
24 | if (file_exists(dirname(__FILE__).'/../MoufUI.php')) {
25 | require_once dirname(__FILE__).'/../MoufUI.php';
26 | }
27 | }
28 |
29 | $splashUrlPrefix = ROOT_URL."mouf/";
30 | require_once '../plugins/mvc/splash/3.2/splash.php';
31 |
32 | ?>
--------------------------------------------------------------------------------
/src/utils/apply_MIT_license_header.php:
--------------------------------------------------------------------------------
1 | #!/usr/bin/php
2 | \n".$content;
26 | }
27 |
28 | // Get first line
29 | $linePos = strpos($content, "\n");
30 | $firstLine = substr($content, 0, $linePos+1);
31 | $end = substr($content, $linePos+1);
32 |
33 | $newFileContent = $firstLine.$licenseHeaderTxt.$end;
34 | file_put_contents($filename, $newFileContent);
35 | } else {
36 | echo "Skipping file $filename: already licensed\n";
37 | }
38 | }
--------------------------------------------------------------------------------
/src/utils/license_header.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the Mouf core package.
3 | *
4 | * (c) 2012 David Negrier
5 | *
6 | * For the full copyright and license information, please view the LICENSE.txt
7 | * file that was distributed with this source code.
8 | */
9 |
10 |
--------------------------------------------------------------------------------
/src/utils/license_header_2.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 David Negrier
3 | *
4 | * See the file LICENSE.txt for copying permission.
5 | */
6 |
7 |
--------------------------------------------------------------------------------
/tests/Mouf/MoufManagerTest.php:
--------------------------------------------------------------------------------
1 | createInstance("Mouf\TestClasses\TestClass2");
15 |
16 | $instanceDescriptor = $container->createInstance("Mouf\TestClasses\TestClass1");
17 | $instanceDescriptor->getProperty("constructorParamA")->setValue(1);
18 | $instanceDescriptor->getProperty("constructorParamB")->setValue($instanceDescriptorClass2);
19 | $instanceDescriptor->getProperty("constructorParamC")->setValue($instanceDescriptorClass2);
20 | $instanceDescriptor->setName("testClass1");
21 |
22 | $instance = $container->getInstance("testClass1");
23 | /* @var $instance \Mouf\TestClasses\TestClass */
24 | $this->assertEquals(1, $instance->getConstructorParamA());
25 | $this->assertInstanceOf("Mouf\TestClasses\TestClass2", $instance->getConstructorParamB());
26 | $this->assertInstanceOf("Mouf\TestClasses\TestClass2", $instance->getConstructorParamC());
27 | $this->assertEquals($instance->getConstructorParamB(), $instance->getConstructorParamC());
28 | }
29 |
30 | public function testCallbackInjection() {
31 | $container = new MoufManager();
32 |
33 | $instanceDescriptor = $container->createInstance("Mouf\TestClasses\TestClass1");
34 | $instanceDescriptor->getProperty("constructorParamA")->setOrigin('php')->setValue('return [];');
35 | $instanceDescriptor->setName("testClass1");
36 |
37 | // Note: we cannot retrieve the instance without first saving and loading the file.
38 | // This is not an issue.
39 | }
40 |
41 |
42 | static function main() {
43 | $suite = new \PHPUnit_Framework_TestSuite( __CLASS__);
44 | \PHPUnit_TextUI_TestRunner::run( $suite);
45 | }
46 | }
47 |
48 | if (!defined('PHPUnit_MAIN_METHOD')) {
49 | MoufManagerTest::main();
50 | }
--------------------------------------------------------------------------------
/tests/Mouf/Reflection/MoufReflectionClassTest.php:
--------------------------------------------------------------------------------
1 | getUseNamespaces();
15 | $this->assertCount(1, $useMap);
16 | $this->assertArrayHasKey("Alias", $useMap);
17 | $this->assertEquals("Mouf\\TestClasses\\MyClass", $useMap["Alias"]);
18 | }
19 |
20 | public function test_getUseNamespaces_with_no_use() {
21 | $reflection = new MoufReflectionClass(ClassWithErrors::class);
22 | $useMap = $reflection->getUseNamespaces();
23 | $this->assertCount(0, $useMap);
24 | }
25 |
26 | public function test_getUseNamespaces_with_closure_before_class() {
27 | $reflection = new MoufReflectionClass(TestClassWithClosureBeforeClass::class);
28 | $useMap = $reflection->getUseNamespaces();
29 | $this->assertCount(0, $useMap);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/tests/Mouf/TestClasses/ClassWithErrors.php:
--------------------------------------------------------------------------------
1 | constructorParamA = $constructorParamA;
22 | $this->constructorParamB = $constructorParamB;
23 | $this->constructorParamC = $constructorParamC;
24 | }
25 |
26 | private $constructorParamA;
27 |
28 | public function getConstructorParamA()
29 | {
30 | return $this->constructorParamA;
31 | }
32 |
33 | private $constructorParamB;
34 |
35 | public function getConstructorParamB()
36 | {
37 | return $this->constructorParamB;
38 | }
39 |
40 | private $constructorParamC;
41 |
42 | public function getConstructorParamC()
43 | {
44 | return $this->constructorParamC;
45 | }
46 |
47 |
48 | /**
49 | * @Property
50 | * @var array
51 | */
52 | public $indexedArray;
53 |
54 | /**
55 | * @Property
56 | * @var array
57 | */
58 | public $associativeArray;
59 |
60 | /**
61 | * @Property
62 | * @var int
63 | */
64 | public $int;
65 |
66 | /**
67 | * @Property
68 | * @var TestClass1
69 | */
70 | public $testClass1;
71 |
72 | /**
73 | * @Property
74 | * @var \Mouf\TestClasses\TestClass1
75 | */
76 | public $testClass1FullyQualifiedNamespace;
77 |
78 | /**
79 | * @Property
80 | * @var Subname\Subclass
81 | */
82 | public $testSubNamespace;
83 |
84 | /**
85 | * @Property
86 | * @var Subclass
87 | */
88 | public $testUse;
89 |
90 | /**
91 | * @Property
92 | * @var Subname\Subclass
93 | */
94 | public $testRelativeUse;
95 |
96 |
97 | /**
98 | *
99 | * @Property
100 | * @param TestClass1 $value
101 | */
102 | public function setSetterProperty1($value) {
103 |
104 | }
105 |
106 | /**
107 | *
108 | * @Property
109 | */
110 | public function setSetterProperty2(TestClass1 $value) {
111 |
112 | }
113 | }
114 | ?>
--------------------------------------------------------------------------------
/tests/Mouf/TestClasses/TestClass2.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/Mouf/TestClasses/TestClassA.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/Mouf/TestClasses/TestClassWithAs.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/bootstrap.php:
--------------------------------------------------------------------------------
1 |