Lines Matching refs:phar_obj
1162 phar_archive_object *phar_obj;
1166 phar_obj = (phar_archive_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
1180 if (phar_obj->arc.archive) {
1254 phar_obj->arc.archive = phar_data;
1255 phar_obj->spl.oth_handler = &phar_spl_foreign_handler;
1273 phar_obj->arc.archive->is_data = is_data;
1276 …OBALS->phar_persist_map, (const char *) phar_obj->arc.archive, sizeof(phar_obj->arc.archive), (voi…
1279 phar_obj->spl.info_class = phar_ce_entry;
1402 …phar_archive_object *phar_obj = (phar_archive_object*)zend_object_store_get_object(getThis() TSRML…
1403 if (!phar_obj->arc.archive) { \
1414 …phar_archive_object *phar_obj = (phar_archive_object*)zend_object_store_get_object(getThis() TSRML… local
1416 if (phar_obj->arc.archive && phar_obj->arc.archive->is_persistent) {
1417 …hash_del(&PHAR_GLOBALS->phar_persist_map, (const char *) phar_obj->arc.archive, sizeof(phar_obj->a…
1447 phar_archive_object *phar_obj = p_obj->p; local
1741 …if (!(data = phar_get_or_create_entry_data(phar_obj->arc.archive->fname, phar_obj->arc.archive->fn…
1818 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
1832 …eption, 0 TSRMLS_CC, "Unable to instantiate directory iterator for %s", phar_obj->arc.archive->fna…
1858 …eption, 0 TSRMLS_CC, "Unable to instantiate directory iterator for %s", phar_obj->arc.archive->fna…
1880 …lException, 0 TSRMLS_CC, "Unable to instantiate regex iterator for %s", phar_obj->arc.archive->fna…
1894 pass.p = phar_obj;
1901 …rException, 0 TSRMLS_CC, "phar \"%s\" unable to create temporary file", phar_obj->arc.archive->fna…
1905 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
1911 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
1922 phar_obj->arc.archive->ufp = pass.fp;
1923 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
1960 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
1970 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
1971 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
1978 pass.p = phar_obj;
1985 …Exception, 0 TSRMLS_CC, "phar \"%s\": unable to create temporary file", phar_obj->arc.archive->fna…
1990 phar_obj->arc.archive->ufp = pass.fp;
1991 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
2013 RETURN_LONG(zend_hash_num_elements(&phar_obj->arc.archive->manifest));
2032 RETURN_BOOL(phar_obj->arc.archive->is_tar);
2034 RETURN_BOOL(phar_obj->arc.archive->is_zip);
2036 RETURN_BOOL(!phar_obj->arc.archive->is_tar && !phar_obj->arc.archive->is_zip);
2455 if (phar_obj->arc.archive->is_tar) {
2457 } else if (phar_obj->arc.archive->is_zip) {
2475 flags = phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSION_MASK;
2516 is_data = phar_obj->arc.archive->is_data;
2517 phar_obj->arc.archive->is_data = 0;
2518 ret = phar_convert_to_other(phar_obj->arc.archive, format, ext, flags TSRMLS_CC);
2519 phar_obj->arc.archive->is_data = is_data;
2552 if (phar_obj->arc.archive->is_tar) {
2554 } else if (phar_obj->arc.archive->is_zip) {
2577 flags = phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSION_MASK;
2618 is_data = phar_obj->arc.archive->is_data;
2619 phar_obj->arc.archive->is_data = 1;
2620 ret = phar_convert_to_other(phar_obj->arc.archive, format, ext, flags TSRMLS_CC);
2621 phar_obj->arc.archive->is_data = is_data;
2643 if (phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSED_GZ) {
2647 if (phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSED_BZ2) {
2667 if (!phar_obj->arc.archive->is_writeable) {
2671 if (SUCCESS != php_stream_stat_path(phar_obj->arc.archive->fname, &ssb)) {
2672 if (phar_obj->arc.archive->is_brandnew) {
2694 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
2704 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
2705 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
2708 if (zend_hash_exists(&phar_obj->arc.archive->manifest, fname, (uint) fname_len)) {
2709 …if (SUCCESS == zend_hash_find(&phar_obj->arc.archive->manifest, fname, (uint) fname_len, (void**)&…
2716 phar_obj->arc.archive->is_modified = 1;
2724 phar_flush(phar_obj->arc.archive, NULL, 0, 0, &error TSRMLS_CC);
2745 if (phar_obj->arc.archive->alias && phar_obj->arc.archive->alias != phar_obj->arc.archive->fname) {
2746 RETURN_STRINGL(phar_obj->arc.archive->alias, phar_obj->arc.archive->alias_len, 1);
2762 RETURN_STRINGL(phar_obj->arc.archive->fname, phar_obj->arc.archive->fname_len, 1);
2778 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
2788 if (phar_obj->arc.archive->is_data) {
2789 if (phar_obj->arc.archive->is_tar) {
2800 …if (alias_len == phar_obj->arc.archive->alias_len && memcmp(phar_obj->arc.archive->alias, alias, a…
2815 "Invalid alias \"%s\" specified for phar \"%s\"", alias, phar_obj->arc.archive->fname);
2819 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
2820 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
2823 …if (phar_obj->arc.archive->alias_len && SUCCESS == zend_hash_find(&(PHAR_GLOBALS->phar_alias_map),…
2824 …zend_hash_del(&(PHAR_GLOBALS->phar_alias_map), phar_obj->arc.archive->alias, phar_obj->arc.archive…
2828 oldalias = phar_obj->arc.archive->alias;
2829 oldalias_len = phar_obj->arc.archive->alias_len;
2830 old_temp = phar_obj->arc.archive->is_temporary_alias;
2833 phar_obj->arc.archive->alias = estrndup(alias, alias_len);
2835 phar_obj->arc.archive->alias = NULL;
2838 phar_obj->arc.archive->alias_len = alias_len;
2839 phar_obj->arc.archive->is_temporary_alias = 0;
2840 phar_flush(phar_obj->arc.archive, NULL, 0, 0, &error TSRMLS_CC);
2843 phar_obj->arc.archive->alias = oldalias;
2844 phar_obj->arc.archive->alias_len = oldalias_len;
2845 phar_obj->arc.archive->is_temporary_alias = old_temp;
2848 …zend_hash_add(&(PHAR_GLOBALS->phar_alias_map), oldalias, oldalias_len, (void*)&(phar_obj->arc.arch…
2854 …zend_hash_add(&(PHAR_GLOBALS->phar_alias_map), alias, alias_len, (void*)&(phar_obj->arc.archive), …
2878 RETURN_STRING(phar_obj->arc.archive->version, 1);
2893 phar_obj->arc.archive->donotflush = 1;
2908 RETURN_BOOL(phar_obj->arc.archive->donotflush);
2925 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
2931 phar_obj->arc.archive->donotflush = 0;
2932 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
2954 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
2960 if (phar_obj->arc.archive->is_data) {
2961 if (phar_obj->arc.archive->is_tar) {
2978 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
2979 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
2982 phar_flush(phar_obj->arc.archive, (char *) &zstub, len, 0, &error TSRMLS_CC);
2993 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
2994 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
2997 phar_flush(phar_obj->arc.archive, stub, stub_len, 0, &error TSRMLS_CC);
3031 if (phar_obj->arc.archive->is_data) {
3032 if (phar_obj->arc.archive->is_tar) {
3046 if (ZEND_NUM_ARGS() > 0 && (phar_obj->arc.archive->is_tar || phar_obj->arc.archive->is_zip)) {
3057 if (!phar_obj->arc.archive->is_tar && !phar_obj->arc.archive->is_zip) {
3072 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
3073 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
3076 phar_flush(phar_obj->arc.archive, stub, stub_len, 1, &error TSRMLS_CC);
3106 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3127 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
3128 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
3131 phar_obj->arc.archive->sig_flags = algo;
3132 phar_obj->arc.archive->is_modified = 1;
3136 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3160 if (phar_obj->arc.archive->signature) {
3165 …add_assoc_stringl(return_value, "hash", phar_obj->arc.archive->signature, phar_obj->arc.archive->s…
3166 switch(phar_obj->arc.archive->sig_flags) {
3183 unknown_len = spprintf(&unknown, 0, "Unknown (%u)", phar_obj->arc.archive->sig_flags);
3204 RETURN_BOOL(phar_obj->arc.archive->is_modified);
3283 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3289 if (phar_obj->arc.archive->is_zip) {
3322 if (phar_obj->arc.archive->is_tar) {
3323 ret = phar_convert_to_other(phar_obj->arc.archive, PHAR_FORMAT_TAR, ext, flags TSRMLS_CC);
3325 ret = phar_convert_to_other(phar_obj->arc.archive, PHAR_FORMAT_PHAR, ext, flags TSRMLS_CC);
3350 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3356 if (phar_obj->arc.archive->is_zip) {
3362 if (phar_obj->arc.archive->is_tar) {
3363 …ret = phar_convert_to_other(phar_obj->arc.archive, PHAR_FORMAT_TAR, ext, PHAR_FILE_COMPRESSED_NONE…
3365 …ret = phar_convert_to_other(phar_obj->arc.archive, PHAR_FORMAT_PHAR, ext, PHAR_FILE_COMPRESSED_NON…
3392 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3422 if (phar_obj->arc.archive->is_tar) {
3428 if (!pharobj_cancompress(&phar_obj->arc.archive->manifest TSRMLS_CC)) {
3439 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
3440 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
3443 pharobj_set_compression(&phar_obj->arc.archive->manifest, flags TSRMLS_CC);
3444 phar_obj->arc.archive->is_modified = 1;
3445 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3466 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3472 if (!pharobj_cancompress(&phar_obj->arc.archive->manifest TSRMLS_CC)) {
3478 if (phar_obj->arc.archive->is_tar) {
3481 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
3482 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
3485 pharobj_set_compression(&phar_obj->arc.archive->manifest, PHAR_ENT_COMPRESSED_NONE TSRMLS_CC);
3488 phar_obj->arc.archive->is_modified = 1;
3489 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3516 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3525 …ed to file \"%s\", cannot copy Phar meta-file in %s", oldfile, newfile, phar_obj->arc.archive->fna…
3532 …to file \"%s\", cannot copy to Phar meta-file in %s", oldfile, newfile, phar_obj->arc.archive->fna…
3536 …if (!zend_hash_exists(&phar_obj->arc.archive->manifest, oldfile, (uint) oldfile_len) || SUCCESS !=…
3538 …be copied to file \"%s\", file does not exist in %s", oldfile, newfile, phar_obj->arc.archive->fna…
3542 if (zend_hash_exists(&phar_obj->arc.archive->manifest, newfile, (uint) newfile_len)) {
3543 …if (SUCCESS == zend_hash_find(&phar_obj->arc.archive->manifest, newfile, (uint) newfile_len, (void…
3545 …file \"%s\", file must not already exist in phar %s", oldfile, newfile, phar_obj->arc.archive->fna…
3552 … cannot be copied from \"%s\" in phar %s", newfile, pcr_error, oldfile, phar_obj->arc.archive->fna…
3556 if (phar_obj->arc.archive->is_persistent) {
3557 if (FAILURE == phar_copy_on_write(&(phar_obj->arc.archive) TSRMLS_CC)) {
3558 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
3562 zend_hash_find(&phar_obj->arc.archive->manifest, oldfile, (uint) oldfile_len, (void**)&oldentry);
3599 phar_obj->arc.archive->is_modified = 1;
3600 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3626 if (zend_hash_exists(&phar_obj->arc.archive->manifest, fname, (uint) fname_len)) {
3627 …if (SUCCESS == zend_hash_find(&phar_obj->arc.archive->manifest, fname, (uint) fname_len, (void**)&…
3640 if (zend_hash_exists(&phar_obj->arc.archive->virtual_dirs, fname, (uint) fname_len)) {
3664 …if (!(entry = phar_get_entry_info_dir(phar_obj->arc.archive, fname, fname_len, 1, &error, 0 TSRMLS…
3668 …nnot get stub \".phar/stub.php\" directly in phar \"%s\", use getStub", phar_obj->arc.archive->fna…
3673 …t get alias \".phar/alias.txt\" directly in phar \"%s\", use getAlias", phar_obj->arc.archive->fna…
3678 …ot directly get any files or directories in magic \".phar\" directory", phar_obj->arc.archive->fna…
3687 fname_len = spprintf(&fname, 0, "phar://%s/%s", phar_obj->arc.archive->fname, fname);
3690 spl_instantiate_arg_ex1(phar_obj->spl.info_class, &return_value, 0, zfname TSRMLS_CC);
3802 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3813 …nnot set stub \".phar/stub.php\" directly in phar \"%s\", use setStub", phar_obj->arc.archive->fna…
3818 …t set alias \".phar/alias.txt\" directly in phar \"%s\", use setAlias", phar_obj->arc.archive->fna…
3823 …CC, "Cannot set any files or directories in magic \".phar\" directory", phar_obj->arc.archive->fna…
3827 phar_add_file(&(phar_obj->arc.archive), fname, fname_len, cont_str, cont_len, zresource TSRMLS_CC);
3841 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3850 if (zend_hash_exists(&phar_obj->arc.archive->manifest, fname, (uint) fname_len)) {
3851 …if (SUCCESS == zend_hash_find(&phar_obj->arc.archive->manifest, fname, (uint) fname_len, (void**)&…
3857 if (phar_obj->arc.archive->is_persistent) {
3858 if (FAILURE == phar_copy_on_write(&(phar_obj->arc.archive) TSRMLS_CC)) {
3859 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
3863 zend_hash_find(&phar_obj->arc.archive->manifest, fname, (uint) fname_len, (void **)&entry);
3868 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3902 phar_mkdir(&phar_obj->arc.archive, dirname, dirname_len TSRMLS_CC);
3946 phar_add_file(&(phar_obj->arc.archive), fname, fname_len, NULL, 0, zresource TSRMLS_CC);
3966 …phar_add_file(&(phar_obj->arc.archive), localname, localname_len, cont_str, cont_len, NULL TSRMLS_…
3987 if (phar_obj->arc.archive->is_tar || phar_obj->arc.archive->is_zip) {
3989 …if (SUCCESS == zend_hash_find(&(phar_obj->arc.archive->manifest), ".phar/stub.php", sizeof(".phar/…
3990 …if (phar_obj->arc.archive->fp && !phar_obj->arc.archive->is_brandnew && !(stub->flags & PHAR_ENT_C…
3991 fp = phar_obj->arc.archive->fp;
3993 if (!(fp = php_stream_open_wrapper(phar_obj->arc.archive->fname, "rb", 0, NULL))) {
3994 …dValueException, 0 TSRMLS_CC, "phar error: unable to open phar \"%s\"", phar_obj->arc.archive->fna…
4006 …r error: unable to read stub of phar \"%s\" (cannot create %s filter)", phar_obj->arc.archive->fna…
4026 len = phar_obj->arc.archive->halt_offset;
4028 if (phar_obj->arc.archive->fp && !phar_obj->arc.archive->is_brandnew) {
4029 fp = phar_obj->arc.archive->fp;
4031 fp = php_stream_open_wrapper(phar_obj->arc.archive->fname, "rb", 0, NULL);
4045 if (fp != phar_obj->arc.archive->fp) {
4059 if (fp != phar_obj->arc.archive->fp) {
4075 RETURN_BOOL(phar_obj->arc.archive->metadata != NULL);
4090 if (phar_obj->arc.archive->metadata) {
4091 if (phar_obj->arc.archive->is_persistent) {
4093 …char *buf = estrndup((char *) phar_obj->arc.archive->metadata, phar_obj->arc.archive->metadata_len…
4095 phar_parse_metadata(&buf, &ret, phar_obj->arc.archive->metadata_len TSRMLS_CC);
4099 RETURN_ZVAL(phar_obj->arc.archive->metadata, 1, 0);
4114 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
4123 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
4124 …ion, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fna…
4127 if (phar_obj->arc.archive->metadata) {
4128 zval_ptr_dtor(&phar_obj->arc.archive->metadata);
4129 phar_obj->arc.archive->metadata = NULL;
4132 MAKE_STD_ZVAL(phar_obj->arc.archive->metadata);
4133 ZVAL_ZVAL(phar_obj->arc.archive->metadata, metadata, 1, 0);
4134 phar_obj->arc.archive->is_modified = 1;
4135 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
4153 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
4158 if (phar_obj->arc.archive->metadata) {
4159 zval_ptr_dtor(&phar_obj->arc.archive->metadata);
4160 phar_obj->arc.archive->metadata = NULL;
4161 phar_obj->arc.archive->is_modified = 1;
4162 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
4350 …fp = php_stream_open_wrapper(phar_obj->arc.archive->fname, "rb", IGNORE_URL|STREAM_MUST_SEEK, &act…
4354 "Invalid argument, %s cannot be found", phar_obj->arc.archive->fname);
4422 …if (FAILURE == zend_hash_find(&phar_obj->arc.archive->manifest, Z_STRVAL_PP(zval_file), Z_STRLEN_P…
4424 …act non-existent file \"%s\" from phar \"%s\"", Z_STRVAL_PP(zval_file), phar_obj->arc.archive->fna…
4428 "Extraction from phar \"%s\" failed: %s", phar_obj->arc.archive->fname, error);
4441 …if (FAILURE == zend_hash_find(&phar_obj->arc.archive->manifest, filename, filename_len, (void **)&…
4443 …empted to extract non-existent file \"%s\" from phar \"%s\"", filename, phar_obj->arc.archive->fna…
4449 "Extraction from phar \"%s\" failed: %s", phar_obj->arc.archive->fname, error);
4456 phar = phar_obj->arc.archive;