[^\'"\)\n\r]*)\1;?/';
13 | const REGEX_COMMENTS = '/((?:\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)|\/\/[^\n]+)/';
14 | }
15 |
--------------------------------------------------------------------------------
/src/Assetic/Util/SassUtils.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | abstract class SassUtils extends CssUtils
18 | {
19 | const REGEX_COMMENTS = '/((?:\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)|\/\/[^\n]+)/';
20 | }
21 |
--------------------------------------------------------------------------------
/src/Auth/Concerns/HasProviderProxy.php:
--------------------------------------------------------------------------------
1 | userModel;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Auth/Migrations/2013_10_01_000001_Db_Users.php:
--------------------------------------------------------------------------------
1 | increments('id');
12 | $table->string('first_name')->nullable();
13 | $table->string('last_name')->nullable();
14 | $table->string('login')->unique()->index();
15 | $table->string('email')->unique();
16 | $table->string('password');
17 | $table->string('activation_code')->nullable()->index();
18 | $table->string('persist_code')->nullable();
19 | $table->string('reset_password_code')->nullable()->index();
20 | $table->text('permissions')->nullable();
21 | $table->boolean('is_activated')->default(0);
22 | $table->boolean('is_superuser')->default(false);
23 | $table->timestamp('activated_at')->nullable();
24 | $table->timestamp('last_login')->nullable();
25 | $table->integer('role_id')->unsigned()->nullable()->index();
26 | $table->timestamps();
27 | });
28 | }
29 |
30 | public function down()
31 | {
32 | Schema::drop('users');
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/src/Auth/Migrations/2013_10_01_000002_Db_Groups.php:
--------------------------------------------------------------------------------
1 | increments('id');
12 | $table->string('name')->unique();
13 | $table->string('code')->nullable()->index();
14 | $table->text('description')->nullable();
15 | $table->timestamps();
16 | });
17 | }
18 |
19 | public function down()
20 | {
21 | Schema::drop('groups');
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/src/Auth/Migrations/2013_10_01_000003_Db_Users_Groups.php:
--------------------------------------------------------------------------------
1 | integer('user_id')->unsigned();
12 | $table->integer('group_id')->unsigned();
13 | $table->primary(['user_id', 'group_id']);
14 | });
15 | }
16 |
17 | public function down()
18 | {
19 | Schema::drop('users_groups');
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/src/Auth/Migrations/2013_10_01_000004_Db_Preferences.php:
--------------------------------------------------------------------------------
1 | increments('id');
12 | $table->integer('user_id')->unsigned();
13 | $table->string('namespace', 100);
14 | $table->string('group', 50);
15 | $table->string('item', 150);
16 | $table->text('value')->nullable();
17 | $table->index(['user_id', 'namespace', 'group', 'item'], 'user_item_index');
18 | });
19 | }
20 |
21 | public function down()
22 | {
23 | Schema::drop('preferences');
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/src/Auth/Migrations/2013_10_01_000005_Db_Throttle.php:
--------------------------------------------------------------------------------
1 | increments('id');
12 | $table->integer('user_id')->unsigned()->nullable()->index();
13 | $table->string('ip_address')->nullable()->index();
14 | $table->integer('attempts')->default(0);
15 | $table->timestamp('last_attempt_at')->nullable();
16 | $table->boolean('is_suspended')->default(0);
17 | $table->timestamp('suspended_at')->nullable();
18 | $table->boolean('is_banned')->default(0);
19 | $table->timestamp('banned_at')->nullable();
20 | });
21 | }
22 |
23 | public function down()
24 | {
25 | Schema::drop('throttle');
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/src/Auth/Migrations/2017_10_01_000006_Db_Roles.php:
--------------------------------------------------------------------------------
1 | increments('id');
12 | $table->string('name')->unique();
13 | $table->text('permissions')->nullable();
14 | $table->timestamps();
15 | });
16 | }
17 |
18 | public function down()
19 | {
20 | Schema::drop('roles');
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/src/Auth/Models/Group.php:
--------------------------------------------------------------------------------
1 | 'required|between:4,16|unique:groups',
22 | ];
23 |
24 | /**
25 | * @var array belongsToMany relationship
26 | */
27 | public $belongsToMany = [
28 | 'users' => [User::class, 'table' => 'users_groups']
29 | ];
30 |
31 | /**
32 | * @var array fillable fields
33 | */
34 | protected $fillable = [
35 | 'name',
36 | 'code',
37 | 'description',
38 | ];
39 |
40 | /**
41 | * delete the group
42 | * @return bool
43 | */
44 | public function delete()
45 | {
46 | $this->users()->detach();
47 | return parent::delete();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Combine/Combiner.php:
--------------------------------------------------------------------------------
1 | minify($text);
17 | }
18 |
19 | /**
20 | * compileLess
21 | */
22 | public function compileLess(array $text, $options = [])
23 | {
24 | return (new LessCompile)->compile($text, $options);
25 | }
26 |
27 | /**
28 | * compileScss
29 | */
30 | public function compileScss(array $text, $options = [])
31 | {
32 | return (new ScssCompile)->compile($text, $options);
33 | }
34 |
35 | /**
36 | * minifyJs
37 | */
38 | public function minifyJs(array $text, $options = [])
39 | {
40 | return (new JavascriptMinify)->minify($text);
41 | }
42 |
43 | /**
44 | * compileJs
45 | */
46 | public function compileJs(array $text, $options = [])
47 | {
48 | return (new JsCompile)->compile($text, $options);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/Combine/CombinerServiceProvider.php:
--------------------------------------------------------------------------------
1 | app->singleton('combiner', function ($app) {
20 | return new Combiner;
21 | });
22 | }
23 |
24 | /**
25 | * provides the returned services.
26 | * @return array
27 | */
28 | public function provides()
29 | {
30 | return [
31 | 'combiner',
32 | ];
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Combine/JavascriptMinify.php:
--------------------------------------------------------------------------------
1 | minify(file_get_contents($path));
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Combine/LessCompile.php:
--------------------------------------------------------------------------------
1 | null,
20 | 'compress' => false,
21 | ], $options));
22 |
23 | $parser = new Less_Parser([
24 | 'compress' => (bool) $compress
25 | ]);
26 |
27 | $parser->parse($less);
28 |
29 | // Set the LESS variables after parsing to override them
30 | if ($vars) {
31 | $parser->ModifyVars($vars);
32 | }
33 |
34 | return $parser->getCss();
35 | }
36 |
37 | /**
38 | * compileFile
39 | */
40 | public function compileFile($path, $options = [])
41 | {
42 | return $this->compile(file_get_contents($path), $options);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/Combine/ScssCompile.php:
--------------------------------------------------------------------------------
1 | null,
20 | 'compress' => false, // @todo
21 | ], $options));
22 |
23 | $parser = new Compiler();
24 |
25 | if ($vars) {
26 | $parser->addVariables($vars);
27 | }
28 |
29 | $result = $parser->compileString($scss);
30 |
31 | return $result->getCss();
32 | }
33 |
34 | /**
35 | * compileFile
36 | */
37 | public function compileFile($path, $options = [])
38 | {
39 | return $this->compile(file_get_contents($path), $options);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/Composer/Concerns/HasOctoberCommands.php:
--------------------------------------------------------------------------------
1 | addRepository(
17 | 'octobercms',
18 | 'composer',
19 | $url,
20 | [
21 | 'only' => ['october/*', '*-plugin', '*-theme']
22 | ]
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Composer/Concerns/HasOutput.php:
--------------------------------------------------------------------------------
1 | output = new NullIO();
30 | }
31 | else {
32 | $this->output = $output;
33 | }
34 | }
35 |
36 | /**
37 | * setOutputCommand
38 | */
39 | public function setOutputCommand(Command $command, InputInterface $input)
40 | {
41 | $this->setOutput(new ConsoleIO($input, $command->getOutput(), $command->getHelperSet()));
42 | }
43 |
44 | /**
45 | * setOutputBuffer
46 | */
47 | public function setOutputBuffer()
48 | {
49 | $this->setOutput(new BufferIO());
50 | }
51 |
52 | /**
53 | * getOutputBuffer
54 | */
55 | public function getOutputBuffer(): string
56 | {
57 | if ($this->output instanceof BufferIO) {
58 | return $this->output->getOutput();
59 | }
60 |
61 | return '';
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/src/Composer/resources/file_get_contents.php:
--------------------------------------------------------------------------------
1 | pluck($value, $key)->all();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Database/Connections/Connection.php:
--------------------------------------------------------------------------------
1 | getQueryGrammar(),
20 | $this->getPostProcessor()
21 | );
22 | }
23 |
24 | /**
25 | * logQuery in the connection's query log
26 | * @param string $query
27 | * @param array $bindings
28 | * @param float|null $time
29 | * @return void
30 | */
31 | public function logQuery($query, $bindings, $time = null)
32 | {
33 | if (isset($this->events)) {
34 | $this->events->dispatch('illuminate.query', [$query, $bindings, $time, $this->getName()]);
35 | }
36 |
37 | parent::logQuery($query, $bindings, $time);
38 | }
39 |
40 | /**
41 | * fireConnectionEvent for this connection
42 | * @param string $event
43 | * @return void
44 | */
45 | protected function fireConnectionEvent($event)
46 | {
47 | if (isset($this->events)) {
48 | $this->events->dispatch('connection.'.$this->getName().'.'.$event, $this);
49 | }
50 |
51 | parent::fireConnectionEvent($event);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Database/Connections/MySqlConnection.php:
--------------------------------------------------------------------------------
1 | registerUpdater();
19 | }
20 |
21 | /**
22 | * registerUpdater is like the migrator service, but it updates plugins.
23 | */
24 | protected function registerUpdater()
25 | {
26 | $this->app->singleton('db.updater', function ($app) {
27 | return new Updater;
28 | });
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Database/Migrations/2013_10_01_000001_Db_Deferred_Bindings.php:
--------------------------------------------------------------------------------
1 | increments('id');
12 | $table->string('master_type');
13 | $table->string('master_field');
14 | $table->string('slave_type');
15 | $table->integer('slave_id');
16 | $table->string('session_key');
17 | $table->mediumText('pivot_data')->nullable();
18 | $table->boolean('is_bind')->default(true);
19 | $table->integer('sort_order')->nullable();
20 | $table->timestamps();
21 | });
22 | }
23 |
24 | public function down()
25 | {
26 | Schema::dropIfExists('deferred_bindings');
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/src/Database/Migrations/2013_10_01_000002_Db_Files.php:
--------------------------------------------------------------------------------
1 | increments('id');
12 | $table->string('disk_name');
13 | $table->string('file_name');
14 | $table->integer('file_size');
15 | $table->string('content_type');
16 | $table->string('title')->nullable();
17 | $table->text('description')->nullable();
18 | $table->string('field')->nullable();
19 | $table->integer('attachment_id')->nullable();
20 | $table->string('attachment_type')->nullable();
21 | $table->boolean('is_public')->default(true);
22 | $table->integer('sort_order')->nullable();
23 | $table->timestamps();
24 |
25 | $table->index(['attachment_type', 'attachment_id', 'field'], 'files_master_index');
26 | });
27 | }
28 |
29 | public function down()
30 | {
31 | Schema::dropIfExists('files');
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/src/Database/Migrations/2015_10_01_000003_Db_Revisions.php:
--------------------------------------------------------------------------------
1 | increments('id');
12 | $table->string('revisionable_type');
13 | $table->integer('revisionable_id');
14 | $table->integer('user_id')->unsigned()->nullable()->index();
15 | $table->string('field')->nullable()->index();
16 | $table->string('cast')->nullable();
17 | $table->text('old_value')->nullable();
18 | $table->text('new_value')->nullable();
19 | $table->timestamps();
20 | $table->index(['revisionable_id', 'revisionable_type']);
21 | });
22 | }
23 |
24 | public function down()
25 | {
26 | Schema::dropIfExists('revisions');
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/src/Database/ModelBehavior.php:
--------------------------------------------------------------------------------
1 | model = $model;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Database/ModelException.php:
--------------------------------------------------------------------------------
1 | model = $model;
24 | $this->errors = $model->errors();
25 | $this->evalErrors();
26 | }
27 |
28 | /**
29 | * getModel returns the model with invalid attributes
30 | */
31 | public function getModel(): Model
32 | {
33 | return $this->model;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/Database/Models/Revision.php:
--------------------------------------------------------------------------------
1 | cast === 'date') {
28 | return $this->asDateTime($value);
29 | }
30 |
31 | return $value;
32 | }
33 |
34 | /**
35 | * getOldValueAttribute returns "old value" casted as the saved type
36 | */
37 | public function getOldValueAttribute($value)
38 | {
39 | if ($value === null) {
40 | return null;
41 | }
42 |
43 | if ($this->cast === 'date') {
44 | return $this->asDateTime($value);
45 | }
46 |
47 | return $value;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Database/NestedTreeScope.php:
--------------------------------------------------------------------------------
1 | relationName = $relationName;
28 |
29 | parent::__construct($query, $farParent, $parent, $firstKey, $secondKey, $localKey, $secondLocalKey);
30 |
31 | $this->addDefinedConstraints();
32 | }
33 |
34 | /**
35 | * parentSoftDeletes determines whether close parent of the relation uses Soft Deletes.
36 | * @return bool
37 | */
38 | public function parentSoftDeletes()
39 | {
40 | $uses = class_uses_recursive(get_class($this->parent));
41 |
42 | return in_array(\October\Rain\Database\Traits\SoftDelete::class, $uses) ||
43 | in_array(\Illuminate\Database\Eloquent\SoftDeletes::class, $uses);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Database/Relations/Relation.php:
--------------------------------------------------------------------------------
1 | 'App\Post',
10 | * 'videos' => 'App\Video',
11 | * ]);
12 | *
13 | *
14 | * @package october\database
15 | * @author Alexey Bobkov, Samuel Georges
16 | */
17 | abstract class Relation extends RelationBase
18 | {
19 | }
20 |
--------------------------------------------------------------------------------
/src/Database/Schema/Blueprint.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger($column)->nullable();
23 |
24 | $this->unsignedBigInteger('site_root_id')->nullable();
25 |
26 | $this->index([$column, 'site_root_id'], $indexName);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Database/Scopes/NestedTreeScope.php:
--------------------------------------------------------------------------------
1 | getQuery()->orderBy($model->getLeftColumnName());
21 | }
22 |
23 | /**
24 | * extend the Eloquent query builder.
25 | */
26 | public function extend(BuilderBase $builder)
27 | {
28 | $removeOnMethods = ['reorder', 'orderBy', 'groupBy'];
29 |
30 | foreach ($removeOnMethods as $method) {
31 | $builder->macro($method, function ($builder, ...$args) use ($method) {
32 | $builder
33 | ->withoutGlobalScope($this)
34 | ->getQuery()
35 | ->$method(...$args)
36 | ;
37 |
38 | return $builder;
39 | });
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/Database/Scopes/SoftDeleteScope.php:
--------------------------------------------------------------------------------
1 | isSoftDeleteEnabled()) {
21 | $builder->whereNull($model->getQualifiedDeletedAtColumn());
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Database/Scopes/SortableScope.php:
--------------------------------------------------------------------------------
1 | getQuery()->orderBy($model->getQualifiedSortOrderColumn());
21 | }
22 |
23 | /**
24 | * extend the Eloquent query builder.
25 | */
26 | public function extend(BuilderBase $builder)
27 | {
28 | $removeOnMethods = ['reorder', 'orderBy', 'groupBy'];
29 |
30 | foreach ($removeOnMethods as $method) {
31 | $builder->macro($method, function ($builder, ...$args) use ($method) {
32 | $builder
33 | ->withoutGlobalScope($this)
34 | ->getQuery()
35 | ->$method(...$args)
36 | ;
37 |
38 | return $builder;
39 | });
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/Database/SortableScope.php:
--------------------------------------------------------------------------------
1 | command)) {
19 | return;
20 | }
21 |
22 | $styled = $style ? "<$style>$string$style>" : $string;
23 |
24 | $this->command->getOutput()->writeln($styled);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Element/ElementHolder.php:
--------------------------------------------------------------------------------
1 | touchedElements;
27 | }
28 |
29 | /**
30 | * get an element from the holder instance.
31 | * @param string $key
32 | * @param mixed $default
33 | * @return mixed
34 | */
35 | public function get($key, $default = null)
36 | {
37 | if (isset($this->touchedElements[$key])) {
38 | return $this->touchedElements[$key];
39 | }
40 |
41 | if (isset($this->config[$key])) {
42 | return $this->touchedElements[$key] = $this->config[$key];
43 | }
44 |
45 | return parent::get($key, $default);
46 | }
47 |
48 | /**
49 | * getIterator for the elements.
50 | */
51 | public function getIterator(): Traversable
52 | {
53 | return new Collection($this->config);
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/Element/Navigation/ItemDefinition.php:
--------------------------------------------------------------------------------
1 | order(-1)
28 | ;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Events/Dispatcher.php:
--------------------------------------------------------------------------------
1 | getLaravelDispatcher() : $dispatcher,
20 | $eventsToFake
21 | );
22 | }
23 |
24 | /**
25 | * fire proxies to dispatch
26 | */
27 | public function fire(...$args)
28 | {
29 | return parent::dispatch(...$args);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Exception/AjaxException.php:
--------------------------------------------------------------------------------
1 | $contents];
24 | }
25 | elseif (!is_array($contents)) {
26 | $contents = [];
27 | }
28 |
29 | $this->contents = $contents;
30 |
31 | parent::__construct(json_encode($contents));
32 | }
33 |
34 | /**
35 | * getContents returns invalid fields.
36 | */
37 | public function getContents()
38 | {
39 | return $this->contents;
40 | }
41 |
42 | /**
43 | * addContent is used to add extra data to an AJAX exception
44 | */
45 | public function addContent(string $key, $val)
46 | {
47 | $this->contents[$key] = $val;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Exception/ApplicationException.php:
--------------------------------------------------------------------------------
1 | app->singleton('flash', function () {
14 | return new FlashBag;
15 | });
16 |
17 | $this->app->alias('flash', FlashBag::class);
18 | }
19 |
20 | /**
21 | * provides gets the services provided by the provider
22 | */
23 | public function provides()
24 | {
25 | return ['flash'];
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Foundation/Bootstrap/LoadEnvironmentFromHost.php:
--------------------------------------------------------------------------------
1 | getEnvironmentConfiguration()) {
22 | $hostname = $_SERVER['HTTP_HOST'] ?? null;
23 |
24 | if ($hostname && isset($config['hosts'][$hostname])) {
25 | putenv("APP_ENV={$config['hosts'][$hostname]}");
26 | }
27 | }
28 | }
29 |
30 | /**
31 | * getEnvironmentConfiguration loads the file-based environment configuration
32 | */
33 | protected function getEnvironmentConfiguration(): ?array
34 | {
35 | $configPath = base_path().'/config/environment.php';
36 |
37 | if (!file_exists($configPath)) {
38 | return null;
39 | }
40 |
41 | try {
42 | $config = require $configPath;
43 | }
44 | catch (Exception $ex) {
45 | $config = [];
46 | }
47 |
48 | return (array) $config;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/Foundation/Bootstrap/RegisterClassLoader.php:
--------------------------------------------------------------------------------
1 | basePath()
20 | );
21 |
22 | $app->instance(ClassLoader::class, $loader);
23 |
24 | $loader->register();
25 |
26 | $loader->addNamespace('App\\', '');
27 |
28 | $loader->addDirectories([
29 | 'modules',
30 | 'plugins'
31 | ]);
32 |
33 | $app->after(function () use ($loader) {
34 | $loader->build();
35 | });
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Foundation/Console/ClearCompiledCommand.php:
--------------------------------------------------------------------------------
1 | laravel->getCachedClassesPath())) {
15 | @unlink($classesPath);
16 | }
17 |
18 | parent::handle();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Foundation/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | bootstrap();
37 |
38 | $this->app['events']->dispatch('console.schedule', [$schedule]);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Foundation/Console/RouteCacheCommand.php:
--------------------------------------------------------------------------------
1 | getFreshApplication()['router']->registerLateRoutes();
15 |
16 | return tap($routes->getRoutes(), function ($routes) {
17 | $routes->refreshNameLookups();
18 | $routes->refreshActionLookups();
19 | });
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Foundation/Console/RouteListCommand.php:
--------------------------------------------------------------------------------
1 | registerLateRoutes();
21 | }
22 |
23 | parent::__construct($router);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php:
--------------------------------------------------------------------------------
1 | app->maintenanceMode()->data();
28 |
29 | return Response::make(
30 | View::make($view, [
31 | 'message' => $ex->getMessage(),
32 | 'retryAfter' => $data['retry'] ?? null,
33 | ]),
34 | $ex->getStatusCode(),
35 | $ex->getHeaders()
36 | );
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/Foundation/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | disableFor($except);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Foundation/Providers/AppDeferSupportServiceProvider.php:
--------------------------------------------------------------------------------
1 | app->singleton('execution.context', function ($app) {
16 |
17 | $requestPath = $this->normalizeUrl($app['request']->path());
18 |
19 | $backendUri = $this->normalizeUrl($app['config']->get('backend.uri', 'backend'));
20 |
21 | if (starts_with($requestPath, $backendUri)) {
22 | return 'backend';
23 | }
24 |
25 | return 'frontend';
26 | });
27 | }
28 |
29 | /**
30 | * normalizeUrl adds leading slash from a URL.
31 | *
32 | * @param string $url URL to normalize.
33 | * @return string Returns normalized URL.
34 | */
35 | protected function normalizeUrl($url)
36 | {
37 | if (substr($url, 0, 1) !== '/') {
38 | $url = '/'.$url;
39 | }
40 |
41 | if (!strlen($url)) {
42 | $url = '/';
43 | }
44 |
45 | return $url;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Foundation/resources/server.php:
--------------------------------------------------------------------------------
1 | invalidPath = $path;
25 |
26 | $this->message = "Error creating directory [{$path}]. Please check write permissions.";
27 |
28 | return $this;
29 | }
30 |
31 | /**
32 | * getInvalidPath is the affected directory path
33 | */
34 | public function getInvalidPath(): string
35 | {
36 | return File::nicePath($this->invalidPath);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Halcyon/Exception/CreateFileException.php:
--------------------------------------------------------------------------------
1 | invalidPath = $path;
25 |
26 | $this->message = "Error creating file [{$path}]. Please check write permissions.";
27 |
28 | return $this;
29 | }
30 |
31 | /**
32 | * getInvalidPath is the affected directory path
33 | */
34 | public function getInvalidPath(): string
35 | {
36 | return File::nicePath($this->invalidPath);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Halcyon/Exception/DeleteFileException.php:
--------------------------------------------------------------------------------
1 | invalidPath = $path;
25 |
26 | $this->message = "Error deleting file [{$path}]. Please check write permissions.";
27 |
28 | return $this;
29 | }
30 |
31 | /**
32 | * getInvalidPath is the affected directory path
33 | */
34 | public function getInvalidPath(): string
35 | {
36 | return File::nicePath($this->invalidPath);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Halcyon/Exception/FileExistsException.php:
--------------------------------------------------------------------------------
1 | invalidPath = $path;
25 |
26 | $this->message = "A file already exists at [{$path}].";
27 |
28 | return $this;
29 | }
30 |
31 | /**
32 | * getInvalidPath is the affected directory path
33 | */
34 | public function getInvalidPath(): string
35 | {
36 | return File::nicePath($this->invalidPath);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Halcyon/Exception/InvalidDirectoryNameException.php:
--------------------------------------------------------------------------------
1 | invalidDirName = $invalidDirName;
24 |
25 | $this->message = "The specified directory name [{$invalidDirName}] is invalid.";
26 |
27 | return $this;
28 | }
29 |
30 | /**
31 | * getInvalidDirectoryName gets the affected file name
32 | */
33 | public function getInvalidDirectoryName(): string
34 | {
35 | return $this->invalidDirName;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Halcyon/Exception/InvalidFileNameException.php:
--------------------------------------------------------------------------------
1 | invalidFileName = $invalidFileName;
24 |
25 | $this->message = "The specified file name [{$invalidFileName}] is invalid.";
26 |
27 | return $this;
28 | }
29 |
30 | /**
31 | * getInvalidFileName gets the affected file name
32 | */
33 | public function getInvalidFileName(): string
34 | {
35 | return $this->invalidFileName;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Halcyon/Exception/MissingFileNameException.php:
--------------------------------------------------------------------------------
1 | model = $model;
24 |
25 | $this->message = "No file name attribute (fileName) specified for model [{$model}].";
26 |
27 | return $this;
28 | }
29 |
30 | /**
31 | * getModel gets the affected Halcyon model
32 | */
33 | public function getModel(): string
34 | {
35 | return $this->model;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Halcyon/Exception/ModelException.php:
--------------------------------------------------------------------------------
1 | model = $model;
25 | $this->errors = $model->errors();
26 | $this->evalErrors();
27 | }
28 |
29 | /**
30 | * getModel returns the model with invalid attributes
31 | */
32 | public function getModel(): Model
33 | {
34 | return $this->model;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/Halcyon/HalcyonServiceProvider.php:
--------------------------------------------------------------------------------
1 | app['halcyon']);
22 |
23 | Model::setEventDispatcher($this->app['events']);
24 |
25 | Model::setCacheManager($this->app['cache']);
26 | }
27 |
28 | /**
29 | * Register the service provider.
30 | *
31 | * @return void
32 | */
33 | public function register()
34 | {
35 | Model::clearBootedModels();
36 |
37 | Model::clearExtendedClasses();
38 |
39 | Model::flushEventListeners();
40 |
41 | $this->app->singleton('halcyon', function ($app) {
42 | return new Resolver;
43 | });
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Halcyon/Migrations/2021_10_01_000001_Db_Templates.php:
--------------------------------------------------------------------------------
1 | increments('id');
12 | $table->string('source')->index();
13 | $table->string('path')->index();
14 | $table->longText('content');
15 | $table->integer('file_size')->unsigned();
16 | $table->dateTime('updated_at')->nullable();
17 | $table->dateTime('deleted_at')->nullable();
18 | });
19 | }
20 |
21 | public function down()
22 | {
23 | Schema::dropIfExists('templates');
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/src/Html/README.md:
--------------------------------------------------------------------------------
1 | ## Rain Html
2 |
3 | An extension of `illuminate\html` and more.
4 |
5 | ### HTML helpers
6 |
7 | These additional helpers are available in the `Helper` class.
8 |
9 | **nameToArray**
10 |
11 | Converts a HTML array string to a PHP array. Empty values are removed.
12 |
13 | ```php
14 | // Converts to PHP array ['user', 'location', 'city']
15 | $array = Helper::nameToArray('user[location][city]');
16 | ```
17 |
18 | **strip**
19 |
20 | Removes HTML from a string.
21 | ```php
22 | // Outputs: Fatal Error! Oh noes!
23 | echo Html::strip('Fatal Error! Oh noes!');
24 | ```
25 |
--------------------------------------------------------------------------------
/src/Mail/MailServiceProvider.php:
--------------------------------------------------------------------------------
1 | app->singleton('mail.manager', function ($app) {
19 | // @deprecated use mailer.beforeResolve or callBeforeResolving
20 | $this->app['events']->dispatch('mailer.beforeRegister', [$this]);
21 |
22 | // Inheritance
23 | $manager = new MailManager($app);
24 |
25 | // @deprecated use mailer.resolve or callAfterResolving
26 | $this->app['events']->dispatch('mailer.register', [$this, $manager]);
27 |
28 | return $manager;
29 | });
30 |
31 | $this->app->bind('mailer', function ($app) {
32 | return $app->make('mail.manager')->mailer();
33 | });
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/Parse/MarkdownData.php:
--------------------------------------------------------------------------------
1 | text = $text;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Parse/ParseServiceProvider.php:
--------------------------------------------------------------------------------
1 | app->singleton('parse.markdown', function ($app) {
17 | return new Markdown;
18 | });
19 |
20 | $this->app->singleton('parse.yaml', function ($app) {
21 | return new Yaml;
22 | });
23 |
24 | $this->app->singleton('parse.twig', function ($app) {
25 | return new Twig;
26 | });
27 |
28 | $this->app->singleton('parse.ini', function ($app) {
29 | return new Ini;
30 | });
31 | }
32 |
33 | /**
34 | * provides the returned services.
35 | * @return array
36 | */
37 | public function provides()
38 | {
39 | return [
40 | 'parse.markdown',
41 | 'parse.yaml',
42 | 'parse.twig',
43 | 'parse.ini'
44 | ];
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Parse/Twig.php:
--------------------------------------------------------------------------------
1 | createTemplate($contents);
24 | return $template->render($vars);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Resize/ResizeBuilder.php:
--------------------------------------------------------------------------------
1 | app->singleton('resizer', function ($app) {
20 | return new ResizeBuilder;
21 | });
22 | }
23 |
24 | /**
25 | * provides the returned services.
26 | * @return array
27 | */
28 | public function provides()
29 | {
30 | return ['resizer'];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Router/README.md:
--------------------------------------------------------------------------------
1 | # URL Router
2 |
3 | URL route patterns follow an easy to read syntax and use in-place named parameters, so there is no need to use regular expressions in most cases.
4 |
5 | ## Creating a route
6 |
7 | You should prepare your route like so:
8 |
9 | ```php
10 | $router = new Router;
11 |
12 | // New route with ID: myRouteId
13 | $router->route('myRouteId', '/post/:id');
14 |
15 | // New route with ID: anotherRouteId
16 | $router->route('anotherRouteId', '/profile/:username');
17 | ```
18 |
19 | ## Route matching
20 |
21 | Once you have prepared your route you can match it like this:
22 |
23 | ```php
24 | if ($router->match('/post/2')) {
25 |
26 | // Returns: [id => 2]
27 | $params = $router->getParameters();
28 |
29 | // Returns: myRouteId
30 | $routeId = $router->matchedRoute();
31 | }
32 | ```
33 |
34 | ## Reverse matching
35 |
36 | You can also reverse match a route by it's identifier:
37 |
38 | ```php
39 | // Returns: /post/2
40 | $url = $router->url('myRouteId', ['id' => 2]);
41 | ```
--------------------------------------------------------------------------------
/src/Scaffold/Console/CreateCommand.php:
--------------------------------------------------------------------------------
1 | (eg: Acme.Blog)}
15 | {name : The name of the command. Eg: ProcessJobs}
16 | {--o|overwrite : Overwrite existing files with generated ones}';
17 |
18 | /**
19 | * @var string description of the console command
20 | */
21 | protected $description = 'Creates a new console command.';
22 |
23 | /**
24 | * @var string type of class being generated
25 | */
26 | protected $typeLabel = 'Command';
27 |
28 | /**
29 | * makeStubs makes all stubs
30 | */
31 | public function makeStubs()
32 | {
33 | $this->makeStub('command/command.stub', 'console/{{studly_name}}.php');
34 | }
35 |
36 | /**
37 | * prepareVars prepares variables for stubs
38 | */
39 | protected function prepareVars(): array
40 | {
41 | return [
42 | 'name' => $this->argument('name'),
43 | 'namespace' => $this->argument('namespace'),
44 | ];
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/CreateComponent.php:
--------------------------------------------------------------------------------
1 | (eg: Acme.Blog)}
15 | {name : The name of the component. Eg: Posts}
16 | {--o|overwrite : Overwrite existing files with generated ones}';
17 |
18 | /**
19 | * @var string name of console command
20 | */
21 | protected $name = 'create:component';
22 |
23 | /**
24 | * @var string description of the console command
25 | */
26 | protected $description = 'Creates a new plugin component.';
27 |
28 | /**
29 | * @var string type of class being generated
30 | */
31 | protected $typeLabel = 'Component';
32 |
33 | /**
34 | * makeStubs makes all stubs
35 | */
36 | public function makeStubs()
37 | {
38 | $this->makeStub('component/component.stub', 'components/{{studly_name}}.php');
39 | $this->makeStub('component/default.stub', 'components/{{lower_name}}/default.htm');
40 | }
41 |
42 | /**
43 | * prepareVars prepares variables for stubs
44 | */
45 | protected function prepareVars(): array
46 | {
47 | return [
48 | 'name' => $this->argument('name'),
49 | 'namespace' => $this->argument('namespace'),
50 | ];
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/CreateContentField.php:
--------------------------------------------------------------------------------
1 | (eg: Acme.Blog)}
15 | {name : The name of the content field. Eg: IconPicker}
16 | {--o|overwrite : Overwrite existing files with generated ones}';
17 |
18 | /**
19 | * @var string description of the console command
20 | */
21 | protected $description = 'Creates a new content field.';
22 |
23 | /**
24 | * @var string type of class being generated
25 | */
26 | protected $typeLabel = 'Content Field';
27 |
28 | /**
29 | * makeStubs makes all stubs
30 | */
31 | public function makeStubs()
32 | {
33 | $this->makeStub('contentfield/contentfield.stub', 'contentfields/{{studly_name}}.php');
34 | }
35 |
36 | /**
37 | * prepareVars prepares variables for stubs
38 | */
39 | protected function prepareVars(): array
40 | {
41 | return [
42 | 'name' => $this->argument('name'),
43 | 'namespace' => $this->argument('namespace'),
44 | ];
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/CreateJob.php:
--------------------------------------------------------------------------------
1 | (eg: Acme.Blog)}
15 | {name : The name of the job class to generate. (eg: ImportPosts) }
16 | {--s|sync : Indicates that job should be synchronous}
17 | {--o|overwrite : Overwrite existing files with generated ones}';
18 |
19 | /**
20 | * @var string description of the console command
21 | */
22 | protected $description = 'Creates a new job class.';
23 |
24 | /**
25 | * @var string typeLabel of class being generated
26 | */
27 | protected $typeLabel = 'Job';
28 |
29 | /**
30 | * makeStubs makes all stubs
31 | */
32 | public function makeStubs()
33 | {
34 | if ($this->option('sync')) {
35 | $this->makeStub('job/job.stub', 'jobs/{{studly_name}}.php');
36 | }
37 | else {
38 | $this->makeStub('job/job.queued.stub', 'jobs/{{studly_name}}.php');
39 | }
40 | }
41 |
42 | /**
43 | * prepareVars prepares variables for stubs
44 | */
45 | protected function prepareVars(): array
46 | {
47 | return [
48 | 'name' => $this->argument('name'),
49 | 'namespace' => $this->argument('namespace'),
50 | ];
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/CreateReportWidget.php:
--------------------------------------------------------------------------------
1 | (eg: Acme.Blog)}
15 | {name : The name of the report widget. Eg: TopPages}
16 | {--o|overwrite : Overwrite existing files with generated ones}';
17 |
18 | /**
19 | * @var string description of the console command
20 | */
21 | protected $description = 'Creates a new report widget.';
22 |
23 | /**
24 | * @var string type of class being generated
25 | */
26 | protected $typeLabel = 'Report Widget';
27 |
28 | /**
29 | * makeStubs makes all stubs
30 | */
31 | public function makeStubs()
32 | {
33 | $this->makeStub('reportwidget/reportwidget.stub', 'reportwidgets/{{studly_name}}.php');
34 | $this->makeStub('reportwidget/widget.stub', 'reportwidgets/{{lower_name}}/partials/_{{lower_name}}.php');
35 | }
36 |
37 | /**
38 | * prepareVars prepares variables for stubs
39 | */
40 | protected function prepareVars(): array
41 | {
42 | return [
43 | 'name' => $this->argument('name'),
44 | 'namespace' => $this->argument('namespace'),
45 | ];
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/CreateSeeder.php:
--------------------------------------------------------------------------------
1 | (eg: Acme.Blog)}
15 | {name : The name of the job class to generate. (eg: PostSeeder) }
16 | {--o|overwrite : Overwrite existing files with generated ones}';
17 |
18 | /**
19 | * @var string description of the console command
20 | */
21 | protected $description = 'Creates a new seeder class.';
22 |
23 | /**
24 | * @var string typeLabel of class being generated
25 | */
26 | protected $typeLabel = 'Seeder';
27 |
28 | /**
29 | * makeStubs makes all stubs
30 | */
31 | public function makeStubs()
32 | {
33 | if ($this->isAppNamespace()) {
34 | $this->makeStub('seeder/create_app_seeder.stub', 'database/seeders/{{studly_name}}.php');
35 | } else {
36 | $this->makeStub('seeder/create_seeder.stub', 'updates/seeders/{{studly_name}}.php');
37 | }
38 | }
39 |
40 | /**
41 | * prepareVars prepares variables for stubs
42 | */
43 | protected function prepareVars(): array
44 | {
45 | return [
46 | 'name' => $this->argument('name'),
47 | 'namespace' => $this->argument('namespace'),
48 | ];
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/command/command.stub:
--------------------------------------------------------------------------------
1 | argument('user');
28 |
29 | $this->output->writeln("Hello {$username}!");
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/component/component.stub:
--------------------------------------------------------------------------------
1 | '{{title_name}} Component',
16 | 'description' => 'No description provided yet...'
17 | ];
18 | }
19 |
20 | /**
21 | * @link https://docs.octobercms.com/3.x/element/inspector-types.html
22 | */
23 | public function defineProperties()
24 | {
25 | return [];
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/component/default.stub:
--------------------------------------------------------------------------------
1 | This is the default markup for component {{name}}
2 |
3 | You can delete this file if you want
4 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/controller/_list_toolbar.stub:
--------------------------------------------------------------------------------
1 |
2 | {% if design == 'popup' %}
3 |
8 |
9 | = __("New :name", ['name' => '{{title_singular_name}}']) ?>
10 |
11 | {% else %}
12 |
15 |
16 | = __("New :name", ['name' => '{{title_singular_name}}']) ?>
17 |
18 | {% endif %}
19 |
20 |
21 |
22 |
"
26 | data-request-confirm="= __("Are you sure?") ?>"
27 | data-list-checked-trigger
28 | data-list-checked-request
29 | disabled>
30 |
31 | = __("Delete") ?>
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/controller/config_form.stub:
--------------------------------------------------------------------------------
1 | # ===================================
2 | # Form Behavior Config
3 | # ===================================
4 |
5 | # Record name
6 | name: {{title_singular_name}}
7 |
8 | # Model Form Field configuration
9 | form: {{namespace_local}}/models/{{lower_model}}/fields.yaml
10 |
11 | # Model Class name
12 | modelClass: {{namespace_php}}\Models\{{studly_model}}
13 |
14 | # Default redirect location
15 | defaultRedirect: {{namespace_path}}/{{lower_name}}
16 |
17 | {% if design %}
18 | # Form Design
19 | design:
20 | displayMode: {{design}}
21 |
22 | {% endif %}
23 | # Create page
24 | create:
25 | title: backend::lang.form.create_title
26 | redirect: {{namespace_path}}/{{lower_name}}/update/:id
27 | redirectClose: {{namespace_path}}/{{lower_name}}
28 |
29 | # Update page
30 | update:
31 | title: backend::lang.form.update_title
32 | redirect: {{namespace_path}}/{{lower_name}}
33 | redirectClose: {{namespace_path}}/{{lower_name}}
34 |
35 | # Preview page
36 | preview:
37 | title: backend::lang.form.preview_title
38 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/controller/config_list.stub:
--------------------------------------------------------------------------------
1 | # ===================================
2 | # List Behavior Config
3 | # ===================================
4 |
5 | # Model List Column configuration
6 | list: {{namespace_local}}/models/{{lower_model}}/columns.yaml
7 |
8 | # Model Class name
9 | modelClass: {{namespace_php}}\Models\{{studly_model}}
10 |
11 | # List Title
12 | title: Manage {{title_plural_name}}
13 |
14 | {% if design == 'popup' %}
15 | # Link each record to popup form design
16 | recordOnClick: popup
17 | {% else %}
18 | # Link URL for each record
19 | recordUrl: {{namespace_path}}/{{lower_name}}/update/:id
20 | {% endif %}
21 |
22 | # Message to display if the list is empty
23 | noRecordsMessage: backend::lang.list.no_records
24 |
25 | # Records to display per page
26 | recordsPerPage: 20
27 |
28 | # Display page numbers with pagination, disable to improve performance
29 | showPageNumbers: true
30 |
31 | # Displays the list column set up button
32 | showSetup: true
33 |
34 | # Displays the sorting link on each column
35 | showSorting: true
36 |
37 | # Default sorting column
38 | defaultSort:
39 | column: id
40 | direction: asc
41 |
42 | # Display checkboxes next to each record
43 | showCheckboxes: true
44 |
45 | # Toolbar widget configuration
46 | toolbar:
47 | # Partial for toolbar buttons
48 | buttons: list_toolbar
49 |
50 | # Search widget configuration
51 | search:
52 | prompt: backend::lang.list.search_prompt
53 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/controller/controller.stub:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title_name}}
4 | = e($this->pageTitle) ?>
5 |
6 |
7 |
8 | = $this->formRenderDesign() ?>
9 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/controller/index.stub:
--------------------------------------------------------------------------------
1 |
2 | = $this->listRender() ?>
3 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/controller/preview.stub:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title_name}}
4 | = e($this->pageTitle) ?>
5 |
6 |
7 |
8 | fatalError): ?>
9 |
10 |
11 | = $this->formRenderPreview() ?>
12 |
13 |
14 |
15 |
16 | = e($this->fatalError) ?>
17 | = e(trans('backend::lang.form.return_to_list')) ?>
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/controller/preview_design.stub:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title_name}}
4 | = e($this->pageTitle) ?>
5 |
6 |
7 |
8 | = $this->formRenderDesign() ?>
9 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/controller/update_design.stub:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title_name}}
4 | = e($this->pageTitle) ?>
5 |
6 |
7 |
8 | = $this->formRenderDesign() ?>
9 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/factory/factory.stub:
--------------------------------------------------------------------------------
1 |
13 | */
14 | public function definition()
15 | {
16 | return [
17 | //
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/factory/factory_app.stub:
--------------------------------------------------------------------------------
1 |
13 | */
14 | public function definition()
15 | {
16 | return [
17 | //
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/filterwidget/javascript.stub:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a sample JavaScript file used by {{name}}
3 | *
4 | * You can delete this file if you want
5 | */
6 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/filterwidget/partial.stub:
--------------------------------------------------------------------------------
1 |
6 | = e(trans($scope->label)) ?>
7 |
8 | 1
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/filterwidget/partial_form.stub:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | value === '1' ? 'selected="selected"' : '' ?>>has a discount
6 | value === '0' ? 'selected="selected"' : '' ?>>does not have a discount
7 |
8 |
9 |
10 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/filterwidget/stylesheet.stub:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a sample StyleSheet file used by {{name}}
3 | *
4 | * You can delete this file if you want
5 | */
6 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/formwidget/formwidget.stub:
--------------------------------------------------------------------------------
1 | prepareVars();
21 | return $this->makePartial('{{lower_name}}');
22 | }
23 |
24 | public function prepareVars()
25 | {
26 | $this->vars['name'] = $this->formField->getName();
27 | $this->vars['value'] = $this->getLoadValue();
28 | $this->vars['model'] = $this->model;
29 | }
30 |
31 | public function loadAssets()
32 | {
33 | $this->addCss('css/{{lower_name}}.css');
34 | $this->addJs('js/{{lower_name}}.js');
35 | }
36 |
37 | public function getSaveValue($value)
38 | {
39 | return $value;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/formwidget/javascript.stub:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a sample JavaScript file used by {{name}}
3 | *
4 | * You can delete this file if you want
5 | */
6 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/formwidget/partial.stub:
--------------------------------------------------------------------------------
1 | previewMode): ?>
2 |
3 |
4 | = $value ?>
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/formwidget/stylesheet.stub:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a sample StyleSheet file used by {{name}}
3 | *
4 | * You can delete this file if you want
5 | */
6 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/job/job.queued.stub:
--------------------------------------------------------------------------------
1 | id();
20 | {% if timestamps %}
21 | $table->timestamps();
22 | {% endif %}{% if softDeletes %}
23 | $table->softDeletes();
24 | {% endif %}
25 | });
26 | }
27 |
28 | /**
29 | * down reverses the migration
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('{{table}}');
34 | }
35 | };
36 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/migration/create_table.stub:
--------------------------------------------------------------------------------
1 | id();
21 | {% if timestamps %}
22 | $table->timestamps();
23 | {% endif %}{% if softDeletes %}
24 | $table->softDeletes();
25 | {% endif %}
26 | });
27 | }
28 |
29 | /**
30 | * down reverses the migration
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('{{table}}');
35 | }
36 | };
37 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/migration/update_app_table.stub:
--------------------------------------------------------------------------------
1 | [
19 | 'title' => 'Name',
20 | 'default' => '{{title_name}} Report Widget',
21 | 'type' => 'string',
22 | 'validation' => [
23 | 'required' => [
24 | 'message' => 'The Name field is required'
25 | ],
26 | 'regex' => [
27 | 'message' => 'The Name field can contain only Latin letters.',
28 | 'pattern' => '^[a-zA-Z]+$'
29 | ]
30 | ]
31 | ],
32 | ];
33 | }
34 |
35 | public function render()
36 | {
37 | try {
38 | $this->prepareVars();
39 | }
40 | catch (Exception $ex) {
41 | $this->vars['error'] = $ex->getMessage();
42 | }
43 |
44 | return $this->makePartial('{{lower_name}}');
45 | }
46 |
47 | public function prepareVars()
48 | {
49 | }
50 |
51 | protected function loadAssets()
52 | {
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/reportwidget/widget.stub:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/seeder/create_app_seeder.stub:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | ./tests
15 | ./tests/browser
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/test/phpunit.plugin.stub:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | ./tests
15 | ./tests/browser
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/Scaffold/Console/test/test.stub:
--------------------------------------------------------------------------------
1 | assertTrue(true);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Support/Arr.php:
--------------------------------------------------------------------------------
1 | $value) {
22 | list($innerKey, $innerValue) = call_user_func($callback, $key, $value);
23 |
24 | $results[$innerKey] = $innerValue;
25 | }
26 |
27 | return $results;
28 | }
29 |
30 | /**
31 | * trans will translate an array, usually for dropdown and checkboxlist options
32 | */
33 | public static function trans(array $arr): array
34 | {
35 | array_walk_recursive($arr, function(&$value, $key) {
36 | if (is_string($value)) {
37 | $value = Lang::get($value);
38 | }
39 | });
40 |
41 | return $arr;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Support/Collection.php:
--------------------------------------------------------------------------------
1 | pluck($value, $key)->all();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Support/Debug/HtmlDumper.php:
--------------------------------------------------------------------------------
1 | 'background-color:#fff; color:#222; line-height:1.2em; font-weight:normal; font:12px Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:100000',
15 | 'num' => 'color:#a71d5d',
16 | 'const' => 'color:#795da3',
17 | 'str' => 'color:#df5000',
18 | 'cchr' => 'color:#222',
19 | 'note' => 'color:#a71d5d',
20 | 'ref' => 'color:#a0a0a0',
21 | 'public' => 'color:#795da3',
22 | 'protected' => 'color:#795da3',
23 | 'private' => 'color:#795da3',
24 | 'meta' => 'color:#b729d9',
25 | 'key' => 'color:#df5000',
26 | 'index' => 'color:#a71d5d',
27 | ];
28 | }
29 |
--------------------------------------------------------------------------------
/src/Support/Facades/Auth.php:
--------------------------------------------------------------------------------
1 | input($key, $default);
23 | }
24 |
25 | /**
26 | * getFacadeAccessor returns the registered name of the component
27 | * @return string
28 | */
29 | protected static function getFacadeAccessor()
30 | {
31 | return 'request';
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Support/Facades/Mail.php:
--------------------------------------------------------------------------------
1 | app->beforeResolving($name, $callback);
29 |
30 | if ($this->app->resolved($name)) {
31 | $callback($this->app->make($name), $this->app);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Support/Traits/Singleton.php:
--------------------------------------------------------------------------------
1 | init();
41 | }
42 |
43 | /**
44 | * init the singleton free from constructor parameters
45 | */
46 | protected function init()
47 | {
48 | }
49 |
50 | /**
51 | * __clone
52 | * @ignore
53 | */
54 | public function __clone()
55 | {
56 | trigger_error('Cloning '.__CLASS__.' is not allowed.', E_USER_ERROR);
57 | }
58 |
59 | /**
60 | * __wakeup
61 | * @ignore
62 | */
63 | public function __wakeup()
64 | {
65 | trigger_error('Unserializing '.__CLASS__.' is not allowed.', E_USER_ERROR);
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/Translation/FileLoader.php:
--------------------------------------------------------------------------------
1 | = 10
17 | */
18 | protected $path;
19 |
20 | /**
21 | * @var array paths are used by default for the loader.
22 | *
23 | * @todo Can be removed if Laravel >= 10
24 | */
25 | protected $paths;
26 |
27 | /**
28 | * loadNamespaceOverrides loads a local namespaced translation group for overrides
29 | */
30 | protected function loadNamespaceOverrides(array $lines, $locale, $group, $namespace)
31 | {
32 | $paths = (array) $this->path ?: $this->paths;
33 |
34 | return collect($paths)
35 | ->reduce(function ($output, $path) use ($lines, $locale, $group, $namespace) {
36 | $namespace = str_replace('.', '/', $namespace);
37 | $file = "{$path}/{$namespace}/{$locale}/{$group}.php";
38 |
39 | if ($this->files->exists($file)) {
40 | return array_replace_recursive($lines, $this->files->getRequire($file));
41 | }
42 |
43 | return $lines;
44 | }, []);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Translation/README.md:
--------------------------------------------------------------------------------
1 | # Translation
2 |
3 | An extension of illuminate\translation.
4 |
5 | Modules and plugins can have localization files in the /lang directory. Plugin and module localization files are registered automatically.
6 |
7 | ## Accessing localization strings
8 |
9 | ```php
10 | // Get a localization string from the CMS module
11 | echo Lang::get('cms::errors.page.not_found');
12 |
13 | // Get a localization string from the october/blog plugin.
14 | echo Lang::get('october.blog::messages.post.added');
15 | ```
16 |
17 | ## Overriding localization strings
18 |
19 | System users can override localization strings without altering the modules' and plugins' files. This is done by adding localization files to the app/lang directory. To override a plugin's localization:
20 |
21 | ```
22 | app
23 | lang
24 | en
25 | vendorname
26 | pluginname
27 | file.php
28 | ```
29 |
30 | Example: lang/en/october/blog/errors.php
31 |
32 | To override a module's localization:
33 |
34 | ```
35 | app
36 | lang
37 | en
38 | modulename
39 | file.php
40 | ```
41 |
42 | Example: lang/en/cms/errors.php
43 |
--------------------------------------------------------------------------------
/src/Validation/Factory.php:
--------------------------------------------------------------------------------
1 | resolver)) {
16 | return new Validator($this->translator, $data, $rules, $messages, $customAttributes);
17 | }
18 |
19 | return call_user_func($this->resolver, $this->translator, $data, $rules, $messages, $customAttributes);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Validation/ValidationServiceProvider.php:
--------------------------------------------------------------------------------
1 | app->singleton('validator', function ($app) {
17 | $validator = new Factory($app['translator'], $app);
18 |
19 | if (isset($app['db'], $app['validation.presence'])) {
20 | $validator->setPresenceVerifier($app['validation.presence']);
21 | }
22 |
23 | // Replacers for custom rules in Validator class
24 | $validator->replacer('unique_site', function ($message, $attribute, $rule, $parameters) {
25 | return __('validation.unique', ['attribute' => $attribute]);
26 | });
27 |
28 | return $validator;
29 | });
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/tests/Benchmark/GeneralBench.php:
--------------------------------------------------------------------------------
1 | parse('**Hello**');
24 | }
25 |
26 | /**
27 | * @Subject
28 | */
29 | public function benchB()
30 | {
31 | \Str::markdown('**Hello**');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tests/Database/ModelAddersTest.php:
--------------------------------------------------------------------------------
1 | assertEquals(['id' => 'int'], $model->getCasts());
10 |
11 | $model->addCasts(['foo' => 'int']);
12 |
13 | $this->assertEquals(['id' => 'int', 'foo' => 'int'], $model->getCasts());
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/tests/Database/SortableTest.php:
--------------------------------------------------------------------------------
1 | addConnection([
9 | 'driver' => 'sqlite',
10 | 'database' => ':memory:',
11 | 'prefix' => ''
12 | ]);
13 | $capsule->setAsGlobal();
14 | $capsule->bootEloquent();
15 | }
16 |
17 | public function testOrderByIsAutomaticallyAdded()
18 | {
19 | $model = new TestModel;
20 | $query = $model->newQuery()->toSql();
21 |
22 | $this->assertEquals('select * from "test" order by "test"."sort_order" asc', $query);
23 | }
24 |
25 | public function testOrderByCanBeOverridden()
26 | {
27 | $model = new TestModel;
28 | $query1 = $model->newQuery()->orderBy('name')->orderBy('email', 'desc')->toSql();
29 | $query2 = $model->newQuery()->orderBy('sort_order')->orderBy('name')->toSql();
30 |
31 | $this->assertEquals('select * from "test" order by "name" asc, "email" desc', $query1);
32 | $this->assertEquals('select * from "test" order by "sort_order" asc, "name" asc', $query2);
33 | }
34 | }
35 |
36 | class TestModel extends \October\Rain\Database\Model
37 | {
38 | use \October\Rain\Database\Traits\Sortable;
39 |
40 | protected $table = 'test';
41 | }
42 |
--------------------------------------------------------------------------------
/tests/Database/UpdaterTest.php:
--------------------------------------------------------------------------------
1 | updater = new Updater();
12 | }
13 |
14 | public function testClassNameGetsParsedCorrectly()
15 | {
16 | $reflector = new ReflectionClass(TestPlugin\SampleClass::class);
17 | $filePath = $reflector->getFileName();
18 |
19 | $classFullName = $this->updater->getClassFromFile($filePath);
20 |
21 | $this->assertEquals(TestPlugin\SampleClass::class, $classFullName);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/tests/Events/EventDispatcherTest.php:
--------------------------------------------------------------------------------
1 | setLaravelDispatcher(new Dispatcher);
20 |
21 | Event::swap(new FakeDispatcher($dispatcher));
22 |
23 | Event::fire(EventDispatcherTest::class);
24 |
25 | Event::assertDispatched(EventDispatcherTest::class);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/tests/Extension/ExtensionTest.php:
--------------------------------------------------------------------------------
1 | assertEquals('foo', $subject->behaviorAttribute);
12 |
13 | ExtensionTestExampleBehaviorClass1::extend(function ($extension) {
14 | $extension->behaviorAttribute = 'bar';
15 | });
16 |
17 | $subject = new ExtensionTestExampleExtendableClass;
18 | $this->assertEquals('bar', $subject->behaviorAttribute);
19 | }
20 | }
21 |
22 | /*
23 | * Example class that has extensions enabled
24 | */
25 | class ExtensionTestExampleExtendableClass extends Extendable
26 | {
27 | public $implement = ['ExtensionTestExampleBehaviorClass1'];
28 | }
29 |
30 | /**
31 | * Example behavior classes
32 | */
33 | class ExtensionTestExampleBehaviorClass1 extends ExtensionBase
34 | {
35 | public $behaviorAttribute = 'foo';
36 | }
37 |
--------------------------------------------------------------------------------
/tests/Halcyon/DatasourceResolverTest.php:
--------------------------------------------------------------------------------
1 | $theme1,
17 | 'theme2' => $theme2,
18 | 'theme3' => $theme3
19 | ]);
20 |
21 | $this->assertTrue($resolver->hasDatasource('theme1'));
22 | $this->assertTrue($resolver->hasDatasource('theme2'));
23 | $this->assertTrue($resolver->hasDatasource('theme3'));
24 | $this->assertFalse($resolver->hasDatasource('theme4'));
25 | }
26 |
27 | public function testDefaultDatasource()
28 | {
29 | $resolver = new Resolver;
30 | $resolver->setDefaultDatasource('theme1');
31 | $this->assertEquals('theme1', $resolver->getDefaultDatasource());
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tests/Halcyon/ValidationTraitTest.php:
--------------------------------------------------------------------------------
1 | getMockForTrait('October\Rain\Halcyon\Traits\Validation');
8 |
9 | $rules = [
10 | 'field' => 'required',
11 | 'field.two' => 'required|boolean',
12 | 'field[three]' => 'required|date',
13 | 'field[three][child]' => 'required',
14 | 'field[four][][name]' => 'required',
15 | 'field[five' => 'required|string',
16 | 'field][six' => 'required|string',
17 | 'field]seven' => 'required|string',
18 | ];
19 | $rules = self::callProtectedMethod($mock, 'processRuleFieldNames', [$rules]);
20 |
21 | $this->assertEquals([
22 | 'field' => 'required',
23 | 'field.two' => 'required|boolean',
24 | 'field.three' => 'required|date',
25 | 'field.three.child' => 'required',
26 | 'field.four.*.name' => 'required',
27 | 'field[five' => 'required|string',
28 | 'field][six' => 'required|string',
29 | 'field]seven' => 'required|string',
30 | ], $rules);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/tests/Support/CountableTest.php:
--------------------------------------------------------------------------------
1 | 'bar',
8 | 'foo2' => 'bar2'
9 | ];
10 |
11 | $this->assertTrue(is_countable($array));
12 |
13 | $collection = collect([
14 | 'foo' => 'bar',
15 | 'foo2' => 'bar2'
16 | ]);
17 |
18 | $this->assertTrue(is_countable($collection));
19 |
20 | $arrayObj = new ArrayObject([
21 | 'foo' => 'bar',
22 | 'foo2' => 'bar2'
23 | ]);
24 |
25 | $this->assertTrue(is_countable($arrayObj));
26 |
27 | $string = 'Test string';
28 |
29 | $this->assertFalse(is_countable($string));
30 |
31 | $int = 5;
32 |
33 | $this->assertFalse(is_countable($int));
34 |
35 | $emptyArray = [];
36 |
37 | $this->assertTrue(is_countable($emptyArray));
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/tests/Translation/TranslatorTest.php:
--------------------------------------------------------------------------------
1 | translator = $translator;
22 | }
23 |
24 | public function testSimilarWordsParsing()
25 | {
26 | $this->assertEquals(
27 | 'Displayed records: 1-100 of 10',
28 | $this->translator->get('lang.test.pagination', ['from' => 1, 'to' => 100, 'total' => 10])
29 | );
30 | }
31 |
32 | public function testOverrideWithSet()
33 | {
34 | $this->assertEquals('lang.test.hello_override', $this->translator->get('lang.test.hello_override'));
35 | $this->translator->set('lang.test.hello_override', 'Hello Override!');
36 | $this->assertEquals('Hello Override!', $this->translator->get('lang.test.hello_override'));
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/tests/fixtures/database/SampleClass.php:
--------------------------------------------------------------------------------
1 | sampleClass = Arr::class;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/tests/fixtures/halcyon/models/Content.php:
--------------------------------------------------------------------------------
1 | 'The :attribute field is required.'
38 | ];
39 |
40 | public $attributeNames = [
41 | 'title' => 'title',
42 | 'viewBag.meta_title' => 'meta title'
43 | ];
44 |
45 | public $rules = [
46 | 'title' => 'required',
47 | 'viewBag.meta_title' => 'required'
48 | ];
49 | }
50 |
--------------------------------------------------------------------------------
/tests/fixtures/halcyon/themes/theme1/content/welcome.htm:
--------------------------------------------------------------------------------
1 | Hi friend
--------------------------------------------------------------------------------
/tests/fixtures/halcyon/themes/theme1/menus/mainmenu.htm:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/fixtures/halcyon/themes/theme1/pages/about.htm:
--------------------------------------------------------------------------------
1 | title = "About"
2 | ==
3 | Us
4 |
--------------------------------------------------------------------------------
/tests/fixtures/halcyon/themes/theme1/pages/home.htm:
--------------------------------------------------------------------------------
1 | title = "hello"
2 | ==
3 |
4 | function onStart() {}
5 | ?>
6 | ==
7 | World!
8 |
--------------------------------------------------------------------------------
/tests/fixtures/halcyon/themes/theme1/pages/level1/level2/level3/level4/level5/contact.htm:
--------------------------------------------------------------------------------
1 | title = "Contact"
2 | ==
3 | Us
4 |
--------------------------------------------------------------------------------
/tests/fixtures/halcyon/themes/theme1/pages/level1/level2/level3/level4/level5/level6/unknown.htm:
--------------------------------------------------------------------------------
1 | title = "Unknown"
2 | ==
3 | Page
4 |
--------------------------------------------------------------------------------
/tests/fixtures/halcyon/themes/theme1/pages/level1/team.htm:
--------------------------------------------------------------------------------
1 | title = "Team"
2 | ==
3 | Join Us
4 |
--------------------------------------------------------------------------------
/tests/fixtures/halcyon/themes/theme2/pages/home.htm:
--------------------------------------------------------------------------------
1 | title = "Cold"
2 | ==
3 | Chisel
--------------------------------------------------------------------------------
/tests/fixtures/lang/en/lang.php:
--------------------------------------------------------------------------------
1 | [
5 | 'pagination' => 'Displayed records: :from-:to of :total',
6 | 'hello_october' => 'Hello October!'
7 | ],
8 | ];
9 |
--------------------------------------------------------------------------------
/tests/fixtures/parse/array.ini:
--------------------------------------------------------------------------------
1 | [products]
2 | excludeStatuses[] = 1
3 | excludeStatuses[] = 42
4 | excludeStatuses[] = 69
--------------------------------------------------------------------------------
/tests/fixtures/parse/basic.ini:
--------------------------------------------------------------------------------
1 | title = "Plugin components"
2 | url = "/demo/plugins"
3 | layout = "default"
4 |
5 | [demoTodo]
6 | min = 1.2
7 | max = 3
--------------------------------------------------------------------------------
/tests/fixtures/parse/comments-clean.ini:
--------------------------------------------------------------------------------
1 | [owner]
2 | name = "John Doe"
3 | organization = "Acme Widgets Inc."
4 |
5 | [database]
6 | server = "192.0.2.62"
7 | port = 143
8 | file = "payroll.dat"
--------------------------------------------------------------------------------
/tests/fixtures/parse/comments.ini:
--------------------------------------------------------------------------------
1 | ; last modified 1 April 2001 by John Doe
2 | [owner]
3 | name=John Doe
4 | ; name=Adam Person
5 | organization=Acme Widgets Inc.
6 |
7 | [database]
8 | ; use IP address in case network name resolution is not working
9 | server=192.0.2.62
10 | ; server=127.0.0.1
11 | port=143
12 | file="payroll.dat"
--------------------------------------------------------------------------------
/tests/fixtures/parse/multilines-value.ini:
--------------------------------------------------------------------------------
1 | var = "\Test\Path\"
2 | editorContent = "Some
3 | \"Multi-line\"""
4 | text
5 |
"
--------------------------------------------------------------------------------
/tests/fixtures/parse/object.ini:
--------------------------------------------------------------------------------
1 | [viewBag]
2 | code = "signin-snippet"
3 | name = "Sign in snippet"
4 | properties[type] = "string"
5 | properties[title] = "Redirection page"
6 | properties[default] = "/clients"
--------------------------------------------------------------------------------
/tests/fixtures/parse/sections.ini:
--------------------------------------------------------------------------------
1 | var1 = "value 1"
2 | var2 = "value 21"
3 |
4 | [section]
5 | sectionVar1 = "section value 1"
6 | sectionVar2 = "section value 2"
7 |
8 | [section data]
9 | sectionVar3 = "section value 3"
10 | sectionVar4 = "section value 4"
11 |
12 | [emptysection]
--------------------------------------------------------------------------------
/tests/fixtures/parse/simple.ini:
--------------------------------------------------------------------------------
1 | var1 = "value 1"
2 | var2 = "value 21"
--------------------------------------------------------------------------------
/tests/fixtures/parse/subsections.ini:
--------------------------------------------------------------------------------
1 | var1 = "value 1"
2 | var2 = "value 21"
3 |
4 | [section]
5 | sectionVar1 = "section value 1"
6 | sectionVar2 = "section value 2"
7 | subsection[] = "subsection value 1"
8 | subsection[] = "subsection value 2"
9 | sectionVar3 = "section value 3"
10 |
11 | [section data]
12 | sectionVar3 = "section value 3"
13 | sectionVar4 = "section value 4"
14 | subsection[] = "subsection value 1"
15 | subsection[] = "subsection value 2"
--------------------------------------------------------------------------------
/tests/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 | ./
16 |
17 |
18 |
--------------------------------------------------------------------------------