/src/runtime/ext/ext_splfile.h

https://github.com/diegoIta/hiphop-php · C Header · 119 lines · 84 code · 14 blank · 21 comment · 0 complexity · 1d7625447ce22112e7bdb1377ce200cc MD5 · raw file

  1. /*
  2. +----------------------------------------------------------------------+
  3. | HipHop for PHP |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
  6. | Copyright (c) 1997-2010 The PHP Group |
  7. +----------------------------------------------------------------------+
  8. | This source file is subject to version 3.01 of the PHP license, |
  9. | that is bundled with this package in the file LICENSE, and is |
  10. | available through the world-wide-web at the following url: |
  11. | http://www.php.net/license/3_01.txt |
  12. | If you did not receive a copy of the PHP license and are unable to |
  13. | obtain it through the world-wide-web, please send a note to |
  14. | license@php.net so we can mail you a copy immediately. |
  15. +----------------------------------------------------------------------+
  16. */
  17. #ifndef __EXT_SPLFILE_H__
  18. #define __EXT_SPLFILE_H__
  19. // >>>>>> Generated by idl.php. Do NOT modify. <<<<<<
  20. #include <runtime/base/base_includes.h>
  21. namespace HPHP {
  22. ///////////////////////////////////////////////////////////////////////////////
  23. class SplFileInfo: public ResourceData {
  24. public:
  25. DECLARE_OBJECT_ALLOCATION(SplFileInfo);
  26. SplFileInfo() {}
  27. SplFileInfo(CStrRef fileName) : m_fileName(fileName) {}
  28. // overriding ResourceData
  29. virtual const char *o_getClassName() const { return "splfileinfo";}
  30. virtual bool isResource() const { return !m_fileName.empty();}
  31. const std::string &getFileName() { return m_fileName;}
  32. public:
  33. std::string m_fileName;
  34. };
  35. class SplFileObject: public ResourceData {
  36. public:
  37. DECLARE_OBJECT_ALLOCATION(SplFileObject);
  38. SplFileObject(Variant f) {
  39. m_file = f.isNull() ? Object() : f.toObject();
  40. }
  41. // overriding ResourceData
  42. virtual const char *o_getClassName() const { return "splfileobject";}
  43. virtual bool isResource() const { return !m_file.isNull();}
  44. Object getFile() { return m_file;}
  45. private:
  46. Object m_file;
  47. };
  48. Object f_hphp_splfileinfo___construct(CObjRef obj, CStrRef file_name);
  49. int64 f_hphp_splfileinfo_getatime(CObjRef obj);
  50. String f_hphp_splfileinfo_getbasename(CObjRef obj, CStrRef suffix);
  51. int64 f_hphp_splfileinfo_getctime(CObjRef obj);
  52. Object f_hphp_splfileinfo_getfileinfo(CObjRef obj, CStrRef class_name);
  53. String f_hphp_splfileinfo_getfilename(CObjRef obj);
  54. int64 f_hphp_splfileinfo_getgroup(CObjRef obj);
  55. int64 f_hphp_splfileinfo_getinode(CObjRef obj);
  56. String f_hphp_splfileinfo_getlinktarget(CObjRef obj);
  57. int64 f_hphp_splfileinfo_getmtime(CObjRef obj);
  58. int64 f_hphp_splfileinfo_getowner(CObjRef obj);
  59. String f_hphp_splfileinfo_getpath(CObjRef obj);
  60. Object f_hphp_splfileinfo_getpathinfo(CObjRef obj, CStrRef class_name);
  61. String f_hphp_splfileinfo_getpathname(CObjRef obj);
  62. int64 f_hphp_splfileinfo_getperms(CObjRef obj);
  63. Variant f_hphp_splfileinfo_getrealpath(CObjRef obj);
  64. int64 f_hphp_splfileinfo_getsize(CObjRef obj);
  65. String f_hphp_splfileinfo_gettype(CObjRef obj);
  66. bool f_hphp_splfileinfo_isdir(CObjRef obj);
  67. bool f_hphp_splfileinfo_isexecutable(CObjRef obj);
  68. bool f_hphp_splfileinfo_isfile(CObjRef obj);
  69. bool f_hphp_splfileinfo_islink(CObjRef obj);
  70. bool f_hphp_splfileinfo_isreadable(CObjRef obj);
  71. bool f_hphp_splfileinfo_iswritable(CObjRef obj);
  72. Object f_hphp_splfileinfo_openfile(CObjRef obj, CStrRef open_mode, bool use_include_path, CVarRef context);
  73. void f_hphp_splfileinfo_setfileclass(CObjRef obj, CStrRef class_name);
  74. void f_hphp_splfileinfo_setinfoclass(CObjRef obj, CStrRef class_name);
  75. String f_hphp_splfileinfo___tostring(CObjRef obj);
  76. Object f_hphp_splfileobject___construct(CObjRef obj, CStrRef filename, CStrRef open_mode, bool use_include_path, CVarRef context);
  77. Variant f_hphp_splfileobject_current(CObjRef obj);
  78. bool f_hphp_splfileobject_eof(CObjRef obj);
  79. bool f_hphp_splfileobject_fflush(CObjRef obj);
  80. String f_hphp_splfileobject_fgetc(CObjRef obj);
  81. Variant f_hphp_splfileobject_fgetcsv(CObjRef obj, CStrRef delimiter, CStrRef enclosure, CStrRef escape);
  82. String f_hphp_splfileobject_fgets(CObjRef obj);
  83. String f_hphp_splfileobject_fgetss(CObjRef obj, CStrRef allowable_tags);
  84. bool f_hphp_splfileobject_flock(CObjRef obj, Variant wouldblock);
  85. int64 f_hphp_splfileobject_fpassthru(CObjRef obj);
  86. Variant f_hphp_splfileobject_fscanf(int64 _argc, CObjRef obj, CStrRef format, CVarRef _argv);
  87. int64 f_hphp_splfileobject_fseek(CObjRef obj, int64 offset, int64 whence);
  88. Variant f_hphp_splfileobject_fstat(CObjRef obj);
  89. int64 f_hphp_splfileobject_ftell(CObjRef obj);
  90. bool f_hphp_splfileobject_ftruncate(CObjRef obj, int64 size);
  91. int64 f_hphp_splfileobject_fwrite(CObjRef obj, CStrRef str, int64 length);
  92. Variant f_hphp_splfileobject_getcvscontrol(CObjRef obj);
  93. int64 f_hphp_splfileobject_getflags(CObjRef obj);
  94. int64 f_hphp_splfileobject_getmaxlinelen(CObjRef obj);
  95. int64 f_hphp_splfileobject_key(CObjRef obj);
  96. void f_hphp_splfileobject_next(CObjRef obj);
  97. void f_hphp_splfileobject_rewind(CObjRef obj);
  98. bool f_hphp_splfileobject_valid(CObjRef obj);
  99. void f_hphp_splfileobject_seek(CObjRef obj, int64 line_pos);
  100. void f_hphp_splfileobject_setcsvcontrol(CObjRef obj, CStrRef delimiter, CStrRef enclosure, CStrRef escape);
  101. void f_hphp_splfileobject_setflags(CObjRef obj, int64 flags);
  102. void f_hphp_splfileobject_setmaxlinelen(CObjRef obj, int64 max_len);
  103. ///////////////////////////////////////////////////////////////////////////////
  104. }
  105. #endif // __EXT_SPLFILE_H__