Esempio n. 1
0
 /**
  * Returns directory path used for temporary files.
  *
  * @return string
  *   a string with the path of the temporary directory.
  *
  * @see http://php.net/function.sys-get-temp-dir.php
  */
 public static function sys_get_temp_dir()
 {
     VirtualFileSystem::getInstance()->initialize();
     return vfsStream::url('root/temp');
 }
 public static function setUpBeforeClass()
 {
     VirtualFileSystem::getInstance()->initialize();
 }
Esempio n. 3
0
 */
/**
 * Performs any required initialization before the user's script is run.
 */
namespace google\appengine\runtime;

use google\appengine\ext\session\MemcacheSessionHandler;
// Ensure that the class autoloader is the first include.
require_once 'google/appengine/runtime/autoloader.php';
require_once 'google/appengine/runtime/Memcache.php';
require_once 'google/appengine/runtime/Memcached.php';
// Setup the Memcache session handler
MemcacheSessionHandler::configure();
if (!empty($_FILES)) {
    if (ini_get('google_app_engine.direct_file_upload')) {
        VirtualFileSystem::getInstance()->initialize();
        DirectUploadHandler::handle();
    }
    register_shutdown_function('google\\appengine\\runtime\\UnlinkUploads::shutdownHook', $_FILES);
    UnlinkUploads::removeEmptyFiles($_FILES);
}
register_shutdown_function('google\\appengine\\api\\log\\LogService::flush');
// Setup the GS stream wrapper
$url_flags = STREAM_IS_URL;
if (GAE_INCLUDE_REQUIRE_GS_STREAMS === 1) {
    // By clearing the STREAM_IS_URL flag we allow this stream handler to be
    // used in include & require calls.
    $url_flags = 0;
}
stream_wrapper_register('gs', '\\google\\appengine\\ext\\cloud_storage_streams\\CloudStorageStreamWrapper', $url_flags);
if (ini_get('google_app_engine.enable_curl_lite')) {