yii\apidoc\components\BaseController::storeContext PHP Method

storeContext() protected method

Writes context into cache file
protected storeContext ( Context $context, string $location )
$context yii\apidoc\models\Context
$location string
    protected function storeContext($context, $location)
    {
        $cacheFile = $location . '/cache/apidoc.data';
        if (!is_dir($dir = dirname($cacheFile))) {
            mkdir($dir, 0777, true);
        }
        file_put_contents($cacheFile, serialize($context));
    }