luyadev/luya-module-admin

View on GitHub
src/ngrest/base/Render.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace luya\admin\ngrest\base;

use luya\admin\ngrest\ConfigInterface;
use luya\admin\ngrest\render\RenderInterface;
use yii\base\BaseObject;

/**
 * NgRest base rendere which is used in all ngrest render classes.
 *
 * @property \luya\admin\ngrest\ConfigInterface $config
 *
 * @author Basil Suter <basil@nadar.io>
 * @since 1.0.0
 */
abstract class Render extends BaseObject implements RenderInterface
{
    private $_config;

    /**
     * Get current config Context.
     *
     * @return \luya\admin\ngrest\ConfigInterface
     */
    public function getConfig()
    {
        return $this->_config;
    }

    /**
     * Set current config Context.
     *
     * @param \luya\admin\ngrest\ConfigInterface $config
     */
    public function setConfig(ConfigInterface $config)
    {
        $this->_config = $config;
    }
}