Skip to content

changed configuration

Choose a tag to compare

@ytake ytake released this 20 Sep 05:44

configuration

laravel-ytake-aop.php in aspect
append modules key

<?php

return [

    'aspect' => [
        /**
         * choose aop library
         * "ray"(Ray.Aop), "none"(for testing)
         */
        'default' => env('ASPECT_DRIVER', 'ray'),

        /**
         * for aspect driver options
         */
        'drivers'     => [
            'ray'  => [
                // string Path to the compiled directory where compiled classes will be stored
                'compile_dir' => storage_path('framework/aop/compile'),
                // aspect kernel cacheable
                'cache' => env('ASPECT_CACHEABLE', false),
                // string Path to the cache file directory where cache classes will be stored
                'cache_dir' => storage_path('framework/aop/cache'),
            ],
            'none' => [
                // for testing driver
                // no use aspect
            ]
        ],
        'modules' => [
            // append modules
            // \App\Modules\CacheableModule::class,
        ],
    ],

    'annotation' => [
        /**
         * choose annotation reader
         * 'array'(default), 'file'(file cache), apcu
         */
        'default' => env('ASPECT_ANNOTATION_DRIVER', 'array'),

        'debug' => env('ASPECT_ANNOTATION_DEBUG', false),

        'drivers' => [
            'file' => [
                'cache_dir' => storage_path('framework/annotation'),
            ],
        ],

        'ignores' => [
            // global Ignored Annotations
            'Hears',
            'Get',
            'Post',
            'Put',
            'Patch',
            'Options',
            'Delete',
            'Any',
            'Middleware',
            'Resource',
            'Controller'
        ],
    ],
];