Commit Graph

173 Commits

Author SHA1 Message Date
Marcus Boerger
394bd0b8d3 # This block got lost somehow 2007-03-03 14:46:44 +00:00
Marcus Boerger
0337110f19 - [DOC] Add SplInfo::getBasename(), DirectoryIterator::getBasename() 2007-03-03 14:37:17 +00:00
Marcus Boerger
0b1cac154a - Add missing access check 2007-02-26 22:46:13 +00:00
Marcus Boerger
99cd807c3e - Add SplFileInfo::getLinkTarget
- Add SplFileInfo::getRealPath
2007-02-26 22:32:57 +00:00
Marcus Boerger
1aa148e647 - Make stat based functions throw an exception 2007-02-20 13:07:53 +00:00
Marcus Boerger
9bf2f53e87 - Bugfix #40546: SplFileInfo::getPathInfo() throws an execption if directory is in root dir. 2007-02-19 20:32:39 +00:00
Marcus Boerger
ab2c4ffe54 - Mode debug info 2007-01-20 16:19:20 +00:00
Marcus Boerger
688125c252 - Update unicode progress on SPL, looks like nearly done, actually all is
unicode safe by now but a few things need to be added and a few problems
  be clarified.
# I wonder why my keyboard has space issues...it should be out of Us by now
2007-01-19 10:19:50 +00:00
Marcus Boerger
d01145a893 - A few unicode fixes and tidying 2007-01-19 00:36:11 +00:00
Antony Dovgal
1743344cdf fix win32 build 2007-01-18 22:52:32 +00:00
Marcus Boerger
bfa86bfcde - Simplify by using zspprintf 2007-01-18 21:40:18 +00:00
Marcus Boerger
6236d0f0a7 - Ensure string-type is always set correctly 2007-01-17 22:43:53 +00:00
Marcus Boerger
1d4fe8b21a - More help from David 2007-01-17 21:29:38 +00:00
Marcus Boerger
29537f3c7f - A little help from Andrei 2007-01-17 21:23:55 +00:00
Marcus Boerger
f26413f41b - Steps towards unicode 2007-01-16 23:52:14 +00:00
Sebastian Bergmann
3717df72ae Bump year. 2007-01-01 09:29:37 +00:00
Ilia Alshanetsky
2dbfe66e4a MFB: safety checks 2006-12-26 17:40:20 +00:00
Marcus Boerger
ba2f82f2eb - Quick hackto make tests pass
# There is something missing, ZVAL_TYPED_ASCII_STRING(z, type, char*,flags)
# Or am i overseeinghow that works?
2006-12-20 23:30:23 +00:00
Marcus Boerger
61b3ee59fd - Optimize SPL directory stuff by making iterator part of object 2006-11-12 17:56:14 +00:00
Hannes Magnusson
d98dfdb119 SplFileObject::getFilename() should not overwrite SplFileInfo::getFilename()
(Fixes bug where SplFileObject::getFilename() returns relative/path/to/file)
2006-11-12 17:08:45 +00:00
Hannes Magnusson
d634bee086 Fix arginfo 2006-11-06 23:19:46 +00:00
Hannes Magnusson
d8895dd81d Fix segfault on $splinfo->openFile()->getPath()
Improve test
2006-11-06 15:20:23 +00:00
Andrei Zmievski
83e0dbb3d2 - Add an extra parameter to the cast_object handler that can be used by
various types as needed.
- Use that parameter to pass a specific converter for
  IS_UNICODE/IS_STRING types.
2006-10-13 14:52:19 +00:00
Hannes Magnusson
2288a69be1 fix proto 2006-09-29 13:22:43 +00:00
Hannes Magnusson
5075de6c5e Fix arginfo 2006-09-29 12:28:57 +00:00
Antony Dovgal
cefb8421f4 declare subclass after adding class constants to the parent 2006-09-29 12:18:54 +00:00
Marcus Boerger
42e59effea - Fix cvs access through SplFileObject 2006-08-06 13:47:21 +00:00
Marcus Boerger
810c9eee76 - Be on the safe side 2006-07-15 14:54:57 +00:00
Marcus Boerger
4afabf96ee - Implement todo: SplFileObject: ability to set the CSV separator per object, part 2 2006-07-15 14:50:38 +00:00
Marcus Boerger
d795e0b9bb - Implement todo: SplFileObject: ability to set the CSV separator per object 2006-07-15 14:31:51 +00:00
Marcus Boerger
395d4ae5e3 - Fix issue with SplFileObject and directories 2006-07-15 13:01:44 +00:00
Dmitry Stogov
0a435165ba Fixed memory leaks in ext/spl/tests/fileobject_003.phpt 2006-07-10 15:48:09 +00:00
Frank M. Kromann
e6e2754439 Remove ZSTR() from stream macros. Calling function must apply this macro 2006-04-28 19:03:58 +00:00
Frank M. Kromann
1791befa0c Fix Win32 build. NULL_ZSTR was converted to ZSTR(NULL_ZSTR) 2006-04-22 10:39:31 +00:00
Antony Dovgal
48afd4ee03 MF51: fix #36981 (SplFileObject->fgets() ignores max_length) 2006-04-06 19:11:06 +00:00
Antony Dovgal
6a53a49c8b MF51: fix bug #36898 (__set() leaks in classes extending internal ones)
Added:
ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
2006-03-29 15:08:52 +00:00
Antony Dovgal
882df6e4d4 initialize retval 2006-03-20 13:53:56 +00:00
Andrei Zmievski
a75b8f5f35 Fix compiler errors by using NULL_ZSTR where zstr is expected.
# I guess we need to use NULL_ZSTR instead of NULL when passing NULL to
# functions that expect zstr parameter.
2006-03-17 22:52:55 +00:00
Marcus Boerger
b7f6e116f7 - Add read ahead ability
- Add skipping empty lines
- Add ability to read lines as csv
2006-03-09 23:03:08 +00:00
Marcus Boerger
e8e264dcf2 - Cloning might need special treatment as well 2006-03-08 20:30:12 +00:00
Marcus Boerger
24726c19d5 - Something that uses void* oth might want to deinitialize it in the dtor 2006-03-08 20:06:16 +00:00
Pierre Joye
bb1ec86f9d - remove magic_quotes_gpc, magic_quotes_runtime, magic_quotes_sybase
(calling ini_set('magic_....') returns 0|false
- get_magic_quotes_gpc, get_magic_quotes_runtime are kept but always return false
- set_magic_quotes_runtime raises an E_CORE_ERROR
2006-03-08 00:43:32 +00:00
Marcus Boerger
05ffb7902d - WS 2006-03-07 20:22:12 +00:00
Marcus Boerger
1050956ad1 - Proto fixes 2006-03-06 09:47:03 +00:00
Marcus Boerger
04aebae9e4 - Need to change a few things to exception based error handling
- Drop erroneus/useless RecursiveDirectoryIterator::getSubPathInfo()
2006-03-04 22:56:11 +00:00
Marcus Boerger
1c0d546bd4 - Fix issues withhandling of derived info classes as entries 2006-02-27 22:31:07 +00:00
Dmitry Stogov
0f1209ab3d Portable unicode string API:
- use the same type (int) for zval.value.usr.len and zval.value.str.len
  - use union "zstr" as char*/UChar* mixture instead of void*
  - Z_UNISTR() and Z_UNILEN() no longer check for Z_TYPE()
  - nuke int32_t from ZE (not finisned)
2006-02-21 20:12:43 +00:00
Andi Gutmans
1efe984d08 - Get rid of using ENFORCE_SAFE_MODE. 2006-02-19 04:29:42 +00:00
Dmitry Stogov
09ca61c125 Made server wide switch for unicode on/off (according to PDM). 2006-02-13 10:23:59 +00:00
Antony Dovgal
50bbedcec3 fix #36359 (splFileObject::fwrite() doesn't write when no data length specified) 2006-02-10 16:56:56 +00:00
Marcus Boerger
c67d8b2152 - Iterator API was changed 2006-02-05 23:31:47 +00:00
Antony Dovgal
bd8a167442 fix #36295 (typo in SplFileObject::flock() parameter name) 2006-02-05 19:22:13 +00:00
Marcus Boerger
19117cf9c9 - Fix bug #36287 2006-02-05 11:43:28 +00:00
Marcus Boerger
9f628d10f6 - Fix oversight 2006-02-02 19:02:05 +00:00
Ilia Alshanetsky
555cfd0146 MFB51: Only use win32 directory separators on win32 or netware. 2006-02-02 15:10:23 +00:00
Antony Dovgal
6f1ccba730 add missing folding tags
nuke unnecessary semicolons
2006-02-02 12:40:07 +00:00
Antony Dovgal
fc2f82751a MF51: fix #36258 (SplFileObject::getPath() may lead to segfault) 2006-02-02 12:20:26 +00:00
Ilia Alshanetsky
9201fa6918 MFB51: Fixed bug #36134 (DirectoryIterator constructor failed to detect
empty directory names).
2006-01-23 15:24:41 +00:00
Marcus Boerger
2d3dc44908 - Fix issue found by nuno 2006-01-15 00:17:08 +00:00
Marcus Boerger
f22c929561 - Fix #35998 (getPathname() method always returns unix style filenames) 2006-01-13 19:35:27 +00:00
foobar
251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
Zeev Suraski
9955ce10b1 Fix prototype (MFB) 2005-12-18 14:05:23 +00:00
Marcus Boerger
218c07c328 - Fix issue spotted by Wez using ms vc 2005 2005-12-14 09:55:04 +00:00
Marcus Boerger
12c5f90386 - Change to use sane default flags fro RecursiveDirectoryIterator
- Drop 2nd parameter from DirectoryIterator::__construct()
2005-12-11 16:43:00 +00:00
Antony Dovgal
be74ca8f85 MF51: nuke C++ comment 2005-12-09 13:32:07 +00:00
Antony Dovgal
d5cd3efe2b fix segfault in SplFileObject when file doesn't exist or cannot be read 2005-12-08 19:53:43 +00:00
Marcus Boerger
df710be5c7 - Fix minor issues in RecursiveDirectoryIterator & provide new flag consts 2005-11-27 13:07:18 +00:00
Marcus Boerger
1bec704ea7 - Fix editor blocks 2005-11-27 12:13:42 +00:00
Marcus Boerger
35d80e39d2 - Allow to recive derived SplFileInfo/SplFileObject instances 2005-11-01 16:54:44 +00:00
Marcus Boerger
bdb7ff4c2e - Increase buffer for 64 bit systems 2005-10-29 15:48:14 +00:00
Marcus Boerger
feafd25b0d - Add class SplTempFileObject 2005-10-29 15:15:22 +00:00
Marcus Boerger
f9f2e8fa56 - Finalize work on SplFileInfo and derived for now (add missing get*Info())
- Update docu
2005-10-10 21:06:54 +00:00
Marcus Boerger
033ffc206d - Add new example directorytree_size.php
- Improve SplFileInfo:
  . add function getFilename()
  . add function getPath()
-Improve RecursiveTreeIterator
  . add const BYPASS_CURRENT to bypass current instead of getting its
    string representation
  . make key() return the parent key() which calls inner iterators key()
- Improve RecursiveDirectoryIterator
  . add consts CURRENT_AS_FILEINFO, KEY_AS_FILENAME, NEW_CURRENT_AND_KEY
  . make current() return getFilename() or getFileInfo() depending on flags
  . make key()     return getPathname() or getFilename() depending on flags
- Improve DirectoryIterator
  . make __construct() accept flags as second parameter
- Update docu
2005-10-08 18:57:17 +00:00
Marcus Boerger
7b330f195b - Add new class SplFileInfo
. Make DirectoryIterator inherit it
  . Make SplFileObject inherit it
2005-10-08 15:55:04 +00:00
Marcus Boerger
6ccd7ef74d - Update cast_object handlers 2005-10-05 19:12:44 +00:00
Marcus Boerger
50301ddc98 - Rename file class again by popular demmand: calling it SplFileObject now
# Any other idea about the name? Or should i come up with a renaming plan
# for the upcoming versions? :-)
2005-09-15 14:07:39 +00:00
Marcus Boerger
8aa7f36a3b - Rename Observer to SplObserver
- Rename Subject to SplSubject
- Move SPL constants to class constants
- Update docu
2005-09-15 03:31:37 +00:00
Dmitry Stogov
21c1109e0c Unicode support 2005-08-12 11:29:33 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Marcus Boerger
177ea26dc1 - Make line counting work with FileObject::fgetc()
- Add a test for FileObject::fgetc()
- Update docs
2005-05-03 22:18:19 +00:00
Marcus Boerger
287864a611 - Change FileObject's line counting to be zero based
- Make FileObject implement SeekableIterator
- Add tests
2005-05-03 21:11:26 +00:00
Marcus Boerger
4f3b12b3fd - Rename class File to FileObject
# by popular demand
2005-04-14 21:02:09 +00:00
Marcus Boerger
7adb2b0c0b - Add RecursiveDirectoryIterator::getSubPathname() 2005-03-31 23:02:20 +00:00
Marcus Boerger
d383735978 - Add RecursiveDirectoryIterator::getSubPath() 2005-03-31 21:51:46 +00:00
Marcus Boerger
56235c6cc8 Fix the fix 2005-03-09 10:29:27 +00:00
Antony Dovgal
a2413c32ce fix build 2005-03-09 09:19:27 +00:00
Marcus Boerger
f0a3e5be17 More line count fixes 2005-03-09 03:07:42 +00:00
Marcus Boerger
ef17168fd1 No double line counting 2005-03-09 02:54:36 +00:00
Marcus Boerger
7b64727519 - Add/Correct parameter info and protos 2005-03-08 00:42:49 +00:00
Marcus Boerger
9b8725a967 - Add more methods
- Avoid exceptions in iterator access
- Do not read in rewind8) or next() instead read in iteration if neccessary
- Correctly count line numer on reading
2005-03-07 22:18:40 +00:00
Marcus Boerger
1d54f897ca - Fix problem with some plain c pedantic compilers 2005-03-07 08:04:47 +00:00
Marcus Boerger
3960865e8e - In File::fgetcsv() use max length from object 2005-03-07 01:00:29 +00:00
Marcus Boerger
40bf907541 - Add File object 2005-03-07 00:40:57 +00:00
Marcus Boerger
2ce7bcd742 - Allow direct access to spl class entries (SPL cannot be build shared) 2004-11-01 20:57:23 +00:00
Marcus Boerger
9dcce367e0 WS (ups) 2004-10-30 14:34:43 +00:00
Marcus Boerger
e2ba10a727 strip trailing (back)slash from path 2004-10-30 14:33:25 +00:00
Marcus Boerger
d265cdffbf - Fix protoe's 2004-09-03 18:39:30 +00:00
Ard Biesheuvel
5232a5afea 64-bit bugsquash party 2004-06-16 23:57:25 +00:00
Marcus Boerger
6b0f57ee50 Rename hasMore() to valid() as discussed. (Part II) 2004-03-08 18:05:41 +00:00
Marcus Boerger
b6b7c9eb65 Rename hasMore() to valid() as discussed. (Part I) 2004-03-08 17:33:31 +00:00