You are here

private function FileCacheReader::saveCacheFile in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php \Doctrine\Common\Annotations\FileCacheReader::saveCacheFile()

Saves the cache file.

Parameters

string $path:

mixed $data:

Return value

void

3 calls to FileCacheReader::saveCacheFile()
FileCacheReader::getClassAnnotations in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php
Gets the annotations applied to a class.
FileCacheReader::getMethodAnnotations in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php
Gets the annotations applied to a method.
FileCacheReader::getPropertyAnnotations in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php
Gets the annotations applied to a property.

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php, line 187

Class

FileCacheReader
File cache reader for annotations.

Namespace

Doctrine\Common\Annotations

Code

private function saveCacheFile($path, $data) {
  if (!is_writable($this->dir)) {
    throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.', $this->dir));
  }
  file_put_contents($path, '<?php return unserialize(' . var_export(serialize($data), true) . ');');
}