write( $path, serialize($object) ); } public function readCompilationData(\tao_models_classes_service_StorageDirectory $compilationDirectory, $path, $cacheInfo = '') { $path .= '.' . self::OUTPUT_FILE_TYPE; if (($compilationData = $compilationDirectory->read($path)) !== false) { if (($component = @unserialize($compilationData)) !== false) { return $component; } else { $msg = "PHP Compilation Data '" . substr($compilationData, 0, 20) . "...' in directory '" . $compilationDirectory->getId() . "' at path '" . $path . "' could not be unserialized properly."; throw new \common_Exception($msg); } } else { $msg = "PHP Compilation data in directory '" . $compilationDirectory->getId() . "' could not be read properly."; throw new \common_Exception($msg); } } }