├── .gitignore ├── .htaccess ├── README.md ├── application ├── .htaccess ├── config │ ├── autoload.php │ ├── config.php │ ├── constants.php │ ├── database.php │ ├── doctypes.php │ ├── foreign_chars.php │ ├── hooks.php │ ├── index.html │ ├── ion_auth.php │ ├── memcached.php │ ├── migration.php │ ├── mimes.php │ ├── profiler.php │ ├── rest.php │ ├── routes.php │ ├── smileys.php │ └── user_agents.php ├── controllers │ └── index.html ├── core │ ├── MY_Loader.php │ ├── MY_Router.php │ └── index.html ├── helpers │ └── index.html ├── hooks │ └── index.html ├── index.html ├── language │ ├── arabic │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── bulgarian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── catalan │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── croatian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── czech │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── danish │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── dutch │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── english │ │ ├── auth_lang.php │ │ ├── index.html │ │ └── ion_auth_lang.php │ ├── estonian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── finnish │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── french │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── german │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── greek │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── index.html │ ├── indonesian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── italian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── japanese │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── korean │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── lithuanian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── norwegian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── persian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── pirate │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── polish │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── portuguese │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── romanian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── russian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── slovak │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── slovenian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── spanish │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── swedish │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── thai │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── turkish │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── ukrainian │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── vietnamese │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ ├── zh_cn │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php │ └── zh_tw │ │ ├── auth_lang.php │ │ └── ion_auth_lang.php ├── libraries │ ├── Bcrypt.php │ ├── Excel_reader.php │ ├── Format.php │ ├── Ion_auth.php │ ├── REST_Controller.php │ ├── dompdf_gen.php │ ├── index.html │ └── oleread.inc.php ├── logs │ └── index.html ├── models │ ├── Ion_auth_model.php │ └── index.html ├── modules │ ├── api │ │ └── controllers │ │ │ ├── Example.php │ │ │ └── Key.php │ ├── auth │ │ ├── controllers │ │ │ └── Auth.php │ │ └── views │ │ │ ├── change_password.php │ │ │ ├── create_group.php │ │ │ ├── create_user.php │ │ │ ├── deactivate_user.php │ │ │ ├── edit_group.php │ │ │ ├── edit_user.php │ │ │ ├── email │ │ │ ├── activate.tpl.php │ │ │ ├── forgot_password.tpl.php │ │ │ └── new_password.tpl.php │ │ │ ├── forgot_password.php │ │ │ ├── index.php │ │ │ ├── login.php │ │ │ └── reset_password.php │ └── welcome │ │ ├── controllers │ │ └── Welcome.php │ │ └── views │ │ └── welcome_message.php ├── third_party │ ├── MX │ │ ├── Base.php │ │ ├── Ci.php │ │ ├── Config.php │ │ ├── Controller.php │ │ ├── Lang.php │ │ ├── Loader.php │ │ ├── Modules.php │ │ └── Router.php │ ├── dompdf │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── LICENSE.LGPL │ │ ├── dompdf.php │ │ ├── dompdf_config.custom.inc.php │ │ ├── dompdf_config.inc.php │ │ ├── include │ │ │ ├── absolute_positioner.cls.php │ │ │ ├── abstract_renderer.cls.php │ │ │ ├── attribute_translator.cls.php │ │ │ ├── autoload.inc.php │ │ │ ├── block_frame_decorator.cls.php │ │ │ ├── block_frame_reflower.cls.php │ │ │ ├── block_positioner.cls.php │ │ │ ├── block_renderer.cls.php │ │ │ ├── cached_pdf_decorator.cls.php │ │ │ ├── canvas.cls.php │ │ │ ├── canvas_factory.cls.php │ │ │ ├── cellmap.cls.php │ │ │ ├── cpdf_adapter.cls.php │ │ │ ├── css_color.cls.php │ │ │ ├── dompdf.cls.php │ │ │ ├── dompdf_exception.cls.php │ │ │ ├── dompdf_image_exception.cls.php │ │ │ ├── file.skel │ │ │ ├── fixed_positioner.cls.php │ │ │ ├── font_metrics.cls.php │ │ │ ├── frame.cls.php │ │ │ ├── frame_decorator.cls.php │ │ │ ├── frame_factory.cls.php │ │ │ ├── frame_reflower.cls.php │ │ │ ├── frame_tree.cls.php │ │ │ ├── functions.inc.php │ │ │ ├── gd_adapter.cls.php │ │ │ ├── image_cache.cls.php │ │ │ ├── image_frame_decorator.cls.php │ │ │ ├── image_frame_reflower.cls.php │ │ │ ├── image_renderer.cls.php │ │ │ ├── inline_frame_decorator.cls.php │ │ │ ├── inline_frame_reflower.cls.php │ │ │ ├── inline_positioner.cls.php │ │ │ ├── inline_renderer.cls.php │ │ │ ├── javascript_embedder.cls.php │ │ │ ├── line_box.cls.php │ │ │ ├── list_bullet_frame_decorator.cls.php │ │ │ ├── list_bullet_frame_reflower.cls.php │ │ │ ├── list_bullet_image_frame_decorator.cls.php │ │ │ ├── list_bullet_positioner.cls.php │ │ │ ├── list_bullet_renderer.cls.php │ │ │ ├── null_frame_decorator.cls.php │ │ │ ├── null_frame_reflower.cls.php │ │ │ ├── null_positioner.cls.php │ │ │ ├── page_cache.cls.php │ │ │ ├── page_frame_decorator.cls.php │ │ │ ├── page_frame_reflower.cls.php │ │ │ ├── pdflib_adapter.cls.php │ │ │ ├── php_evaluator.cls.php │ │ │ ├── positioner.cls.php │ │ │ ├── renderer.cls.php │ │ │ ├── style.cls.php │ │ │ ├── stylesheet.cls.php │ │ │ ├── table_cell_frame_decorator.cls.php │ │ │ ├── table_cell_frame_reflower.cls.php │ │ │ ├── table_cell_positioner.cls.php │ │ │ ├── table_cell_renderer.cls.php │ │ │ ├── table_frame_decorator.cls.php │ │ │ ├── table_frame_reflower.cls.php │ │ │ ├── table_row_frame_decorator.cls.php │ │ │ ├── table_row_frame_reflower.cls.php │ │ │ ├── table_row_group_frame_decorator.cls.php │ │ │ ├── table_row_group_frame_reflower.cls.php │ │ │ ├── table_row_group_renderer.cls.php │ │ │ ├── table_row_positioner.cls.php │ │ │ ├── tcpdf_adapter.cls.php │ │ │ ├── text_frame_decorator.cls.php │ │ │ ├── text_frame_reflower.cls.php │ │ │ └── text_renderer.cls.php │ │ ├── index.php │ │ ├── lib │ │ │ ├── class.pdf.php │ │ │ ├── fonts │ │ │ │ ├── Courier-Bold.afm │ │ │ │ ├── Courier-BoldOblique.afm │ │ │ │ ├── Courier-Oblique.afm │ │ │ │ ├── Courier.afm │ │ │ │ ├── DejaVuSans-Bold.ttf │ │ │ │ ├── DejaVuSans-Bold.ufm │ │ │ │ ├── DejaVuSans-BoldOblique.ttf │ │ │ │ ├── DejaVuSans-BoldOblique.ufm │ │ │ │ ├── DejaVuSans-ExtraLight.ttf │ │ │ │ ├── DejaVuSans-ExtraLight.ufm │ │ │ │ ├── DejaVuSans-Oblique.ttf │ │ │ │ ├── DejaVuSans-Oblique.ufm │ │ │ │ ├── DejaVuSans.ttf │ │ │ │ ├── DejaVuSans.ufm │ │ │ │ ├── DejaVuSansCondensed-Bold.ttf │ │ │ │ ├── DejaVuSansCondensed-Bold.ufm │ │ │ │ ├── DejaVuSansCondensed-BoldOblique.ttf │ │ │ │ ├── DejaVuSansCondensed-BoldOblique.ufm │ │ │ │ ├── DejaVuSansCondensed-Oblique.ttf │ │ │ │ ├── DejaVuSansCondensed-Oblique.ufm │ │ │ │ ├── DejaVuSansCondensed.ttf │ │ │ │ ├── DejaVuSansCondensed.ufm │ │ │ │ ├── DejaVuSansMono-Bold.ttf │ │ │ │ ├── DejaVuSansMono-Bold.ufm │ │ │ │ ├── DejaVuSansMono-BoldOblique.ttf │ │ │ │ ├── DejaVuSansMono-BoldOblique.ufm │ │ │ │ ├── DejaVuSansMono-Oblique.ttf │ │ │ │ ├── DejaVuSansMono-Oblique.ufm │ │ │ │ ├── DejaVuSansMono.ttf │ │ │ │ ├── DejaVuSansMono.ufm │ │ │ │ ├── DejaVuSerif-Bold.ttf │ │ │ │ ├── DejaVuSerif-Bold.ufm │ │ │ │ ├── DejaVuSerif-BoldItalic.ttf │ │ │ │ ├── DejaVuSerif-BoldItalic.ufm │ │ │ │ ├── DejaVuSerif-Italic.ttf │ │ │ │ ├── DejaVuSerif-Italic.ufm │ │ │ │ ├── DejaVuSerif.ttf │ │ │ │ ├── DejaVuSerif.ufm │ │ │ │ ├── DejaVuSerifCondensed-Bold.ttf │ │ │ │ ├── DejaVuSerifCondensed-Bold.ufm │ │ │ │ ├── DejaVuSerifCondensed-BoldItalic.ttf │ │ │ │ ├── DejaVuSerifCondensed-BoldItalic.ufm │ │ │ │ ├── DejaVuSerifCondensed-Italic.ttf │ │ │ │ ├── DejaVuSerifCondensed-Italic.ufm │ │ │ │ ├── DejaVuSerifCondensed.ttf │ │ │ │ ├── DejaVuSerifCondensed.ufm │ │ │ │ ├── Helvetica-Bold.afm │ │ │ │ ├── Helvetica-BoldOblique.afm │ │ │ │ ├── Helvetica-Oblique.afm │ │ │ │ ├── Helvetica.afm │ │ │ │ ├── Symbol.afm │ │ │ │ ├── Times-Bold.afm │ │ │ │ ├── Times-BoldItalic.afm │ │ │ │ ├── Times-Italic.afm │ │ │ │ ├── Times-Roman.afm │ │ │ │ ├── ZapfDingbats.afm │ │ │ │ ├── dompdf_font_family_cache.dist.php │ │ │ │ └── mustRead.html │ │ │ ├── html5lib │ │ │ │ ├── Data.php │ │ │ │ ├── InputStream.php │ │ │ │ ├── Parser.php │ │ │ │ ├── Tokenizer.php │ │ │ │ ├── TreeBuilder.php │ │ │ │ └── named-character-references.ser │ │ │ ├── php-font-lib │ │ │ │ └── classes │ │ │ │ │ ├── AdobeFontMetrics.php │ │ │ │ │ ├── Autoloader.php │ │ │ │ │ ├── BinaryStream.php │ │ │ │ │ ├── EOT │ │ │ │ │ ├── File.php │ │ │ │ │ └── Header.php │ │ │ │ │ ├── EncodingMap.php │ │ │ │ │ ├── Font.php │ │ │ │ │ ├── Glyph │ │ │ │ │ ├── Outline.php │ │ │ │ │ ├── OutlineComponent.php │ │ │ │ │ ├── OutlineComposite.php │ │ │ │ │ └── OutlineSimple.php │ │ │ │ │ ├── Header.php │ │ │ │ │ ├── OpenType │ │ │ │ │ ├── File.php │ │ │ │ │ └── TableDirectoryEntry.php │ │ │ │ │ ├── Table │ │ │ │ │ ├── DirectoryEntry.php │ │ │ │ │ ├── Table.php │ │ │ │ │ └── Type │ │ │ │ │ │ ├── cmap.php │ │ │ │ │ │ ├── glyf.php │ │ │ │ │ │ ├── head.php │ │ │ │ │ │ ├── hhea.php │ │ │ │ │ │ ├── hmtx.php │ │ │ │ │ │ ├── kern.php │ │ │ │ │ │ ├── loca.php │ │ │ │ │ │ ├── maxp.php │ │ │ │ │ │ ├── name.php │ │ │ │ │ │ ├── nameRecord.php │ │ │ │ │ │ ├── os2.php │ │ │ │ │ │ └── post.php │ │ │ │ │ ├── TrueType │ │ │ │ │ ├── Collection.php │ │ │ │ │ ├── File.php │ │ │ │ │ ├── Header.php │ │ │ │ │ └── TableDirectoryEntry.php │ │ │ │ │ └── WOFF │ │ │ │ │ ├── File.php │ │ │ │ │ ├── Header.php │ │ │ │ │ └── TableDirectoryEntry.php │ │ │ └── res │ │ │ │ ├── broken_image.png │ │ │ │ └── html.css │ │ └── load_font.php │ └── index.html └── views │ ├── errors │ ├── cli │ │ ├── error_404.php │ │ ├── error_db.php │ │ ├── error_exception.php │ │ ├── error_general.php │ │ ├── error_php.php │ │ └── index.html │ ├── html │ │ ├── error_404.php │ │ ├── error_db.php │ │ ├── error_exception.php │ │ ├── error_general.php │ │ ├── error_php.php │ │ └── index.html │ └── index.html │ └── index.html ├── index.php ├── license.txt ├── sparks └── php-activerecord │ └── 0.0.2 │ ├── .gitignore │ ├── README.markdown │ ├── config │ └── autoload.php │ ├── libraries │ └── PHPActiveRecord.php │ ├── spark.info │ └── vendor │ └── php-activerecord │ ├── .gitignore │ ├── ActiveRecord.php │ ├── CHANGELOG │ ├── LICENSE │ ├── README.md │ └── lib │ ├── Cache.php │ ├── CallBack.php │ ├── Column.php │ ├── Config.php │ ├── Connection.php │ ├── ConnectionManager.php │ ├── DateTime.php │ ├── Exceptions.php │ ├── Expressions.php │ ├── Inflector.php │ ├── Model.php │ ├── Reflections.php │ ├── Relationship.php │ ├── SQLBuilder.php │ ├── Serialization.php │ ├── Singleton.php │ ├── Table.php │ ├── Utils.php │ ├── Validations.php │ ├── adapters │ ├── MysqlAdapter.php │ ├── OciAdapter.php │ ├── PgsqlAdapter.php │ └── SqliteAdapter.php │ └── cache │ └── Memcache.php ├── system ├── .htaccess ├── core │ ├── Benchmark.php │ ├── CodeIgniter.php │ ├── Common.php │ ├── Config.php │ ├── Controller.php │ ├── Exceptions.php │ ├── Hooks.php │ ├── Input.php │ ├── Lang.php │ ├── Loader.php │ ├── Log.php │ ├── Model.php │ ├── Output.php │ ├── Router.php │ ├── Security.php │ ├── URI.php │ ├── Utf8.php │ ├── compat │ │ ├── hash.php │ │ ├── index.html │ │ ├── mbstring.php │ │ ├── password.php │ │ └── standard.php │ └── index.html ├── database │ ├── DB.php │ ├── DB_cache.php │ ├── DB_driver.php │ ├── DB_forge.php │ ├── DB_query_builder.php │ ├── DB_result.php │ ├── DB_utility.php │ ├── drivers │ │ ├── cubrid │ │ │ ├── cubrid_driver.php │ │ │ ├── cubrid_forge.php │ │ │ ├── cubrid_result.php │ │ │ ├── cubrid_utility.php │ │ │ └── index.html │ │ ├── ibase │ │ │ ├── ibase_driver.php │ │ │ ├── ibase_forge.php │ │ │ ├── ibase_result.php │ │ │ ├── ibase_utility.php │ │ │ └── index.html │ │ ├── index.html │ │ ├── mssql │ │ │ ├── index.html │ │ │ ├── mssql_driver.php │ │ │ ├── mssql_forge.php │ │ │ ├── mssql_result.php │ │ │ └── mssql_utility.php │ │ ├── mysql │ │ │ ├── index.html │ │ │ ├── mysql_driver.php │ │ │ ├── mysql_forge.php │ │ │ ├── mysql_result.php │ │ │ └── mysql_utility.php │ │ ├── mysqli │ │ │ ├── index.html │ │ │ ├── mysqli_driver.php │ │ │ ├── mysqli_forge.php │ │ │ ├── mysqli_result.php │ │ │ └── mysqli_utility.php │ │ ├── oci8 │ │ │ ├── index.html │ │ │ ├── oci8_driver.php │ │ │ ├── oci8_forge.php │ │ │ ├── oci8_result.php │ │ │ └── oci8_utility.php │ │ ├── odbc │ │ │ ├── index.html │ │ │ ├── odbc_driver.php │ │ │ ├── odbc_forge.php │ │ │ ├── odbc_result.php │ │ │ └── odbc_utility.php │ │ ├── pdo │ │ │ ├── index.html │ │ │ ├── pdo_driver.php │ │ │ ├── pdo_forge.php │ │ │ ├── pdo_result.php │ │ │ ├── pdo_utility.php │ │ │ └── subdrivers │ │ │ │ ├── index.html │ │ │ │ ├── pdo_4d_driver.php │ │ │ │ ├── pdo_4d_forge.php │ │ │ │ ├── pdo_cubrid_driver.php │ │ │ │ ├── pdo_cubrid_forge.php │ │ │ │ ├── pdo_dblib_driver.php │ │ │ │ ├── pdo_dblib_forge.php │ │ │ │ ├── pdo_firebird_driver.php │ │ │ │ ├── pdo_firebird_forge.php │ │ │ │ ├── pdo_ibm_driver.php │ │ │ │ ├── pdo_ibm_forge.php │ │ │ │ ├── pdo_informix_driver.php │ │ │ │ ├── pdo_informix_forge.php │ │ │ │ ├── pdo_mysql_driver.php │ │ │ │ ├── pdo_mysql_forge.php │ │ │ │ ├── pdo_oci_driver.php │ │ │ │ ├── pdo_oci_forge.php │ │ │ │ ├── pdo_odbc_driver.php │ │ │ │ ├── pdo_odbc_forge.php │ │ │ │ ├── pdo_pgsql_driver.php │ │ │ │ ├── pdo_pgsql_forge.php │ │ │ │ ├── pdo_sqlite_driver.php │ │ │ │ ├── pdo_sqlite_forge.php │ │ │ │ ├── pdo_sqlsrv_driver.php │ │ │ │ └── pdo_sqlsrv_forge.php │ │ ├── postgre │ │ │ ├── index.html │ │ │ ├── postgre_driver.php │ │ │ ├── postgre_forge.php │ │ │ ├── postgre_result.php │ │ │ └── postgre_utility.php │ │ ├── sqlite │ │ │ ├── index.html │ │ │ ├── sqlite_driver.php │ │ │ ├── sqlite_forge.php │ │ │ ├── sqlite_result.php │ │ │ └── sqlite_utility.php │ │ ├── sqlite3 │ │ │ ├── index.html │ │ │ ├── sqlite3_driver.php │ │ │ ├── sqlite3_forge.php │ │ │ ├── sqlite3_result.php │ │ │ └── sqlite3_utility.php │ │ └── sqlsrv │ │ │ ├── index.html │ │ │ ├── sqlsrv_driver.php │ │ │ ├── sqlsrv_forge.php │ │ │ ├── sqlsrv_result.php │ │ │ └── sqlsrv_utility.php │ └── index.html ├── fonts │ ├── index.html │ └── texb.ttf ├── helpers │ ├── array_helper.php │ ├── captcha_helper.php │ ├── cookie_helper.php │ ├── date_helper.php │ ├── directory_helper.php │ ├── download_helper.php │ ├── email_helper.php │ ├── file_helper.php │ ├── form_helper.php │ ├── html_helper.php │ ├── index.html │ ├── inflector_helper.php │ ├── language_helper.php │ ├── number_helper.php │ ├── path_helper.php │ ├── security_helper.php │ ├── smiley_helper.php │ ├── string_helper.php │ ├── text_helper.php │ ├── typography_helper.php │ ├── url_helper.php │ └── xml_helper.php ├── index.html ├── language │ ├── english │ │ ├── calendar_lang.php │ │ ├── date_lang.php │ │ ├── db_lang.php │ │ ├── email_lang.php │ │ ├── form_validation_lang.php │ │ ├── ftp_lang.php │ │ ├── imglib_lang.php │ │ ├── index.html │ │ ├── migration_lang.php │ │ ├── number_lang.php │ │ ├── pagination_lang.php │ │ ├── profiler_lang.php │ │ ├── unit_test_lang.php │ │ └── upload_lang.php │ └── index.html └── libraries │ ├── Cache │ ├── Cache.php │ ├── drivers │ │ ├── Cache_apc.php │ │ ├── Cache_dummy.php │ │ ├── Cache_file.php │ │ ├── Cache_memcached.php │ │ ├── Cache_redis.php │ │ ├── Cache_wincache.php │ │ └── index.html │ └── index.html │ ├── Calendar.php │ ├── Cart.php │ ├── Driver.php │ ├── Email.php │ ├── Encrypt.php │ ├── Encryption.php │ ├── Form_validation.php │ ├── Ftp.php │ ├── Image_lib.php │ ├── Javascript.php │ ├── Javascript │ ├── Jquery.php │ └── index.html │ ├── Migration.php │ ├── Pagination.php │ ├── Parser.php │ ├── Profiler.php │ ├── Session │ ├── Session.php │ ├── SessionHandlerInterface.php │ ├── Session_driver.php │ ├── drivers │ │ ├── Session_database_driver.php │ │ ├── Session_files_driver.php │ │ ├── Session_memcached_driver.php │ │ ├── Session_redis_driver.php │ │ └── index.html │ └── index.html │ ├── Table.php │ ├── Trackback.php │ ├── Typography.php │ ├── Unit_test.php │ ├── Upload.php │ ├── User_agent.php │ ├── Xmlrpc.php │ ├── Xmlrpcs.php │ ├── Zip.php │ └── index.html └── tools ├── README.md ├── lib └── spark │ ├── sources │ ├── spark_cli.php │ ├── spark_exception.php │ ├── spark_source.php │ ├── spark_type.php │ ├── spark_types │ ├── git_spark.php │ ├── hg_spark.php │ └── zip_spark.php │ └── spark_utils.php ├── spark └── test ├── install_test.php ├── lib ├── bootstrap.php └── test-sparks │ └── .gitkeep ├── phpunit.xml ├── remove_test.php ├── search_test.php └── version_test.php /.gitignore: -------------------------------------------------------------------------------- 1 | */config/development 2 | */logs/log-*.php 3 | */logs/!index.html 4 | */cache/* 5 | */cache/!index.html 6 | */cache/!.htaccess 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteBase /ci3/ 4 | 5 | 6 | RewriteCond %{REQUEST_FILENAME} !-f 7 | RewriteCond %{REQUEST_FILENAME} !-d 8 | RewriteRule ^(.*)$ index.php/$1 [L] 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Codeigniter 3 boilerplate 2 | 3 | ### What's included: 4 | 5 | * Codeigniter 3.0: [http://codeigniter.com](http://codeigniter.com) 6 | * Modular Extensions: [https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc](https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc) 7 | * php-activerecord: [http://www.phpactiverecord.org/](http://www.phpactiverecord.org/) 8 | * CodeIgniter-Ion-Auth: [https://github.com/benedmunds/CodeIgniter-Ion-Auth](https://github.com/benedmunds/CodeIgniter-Ion-Auth) 9 | * dompdf: [https://dompdf.github.io/](https://dompdf.github.io/) 10 | * Excel reader: [http://sourceforge.net/projects/phpexcelreader/](http://sourceforge.net/projects/phpexcelreader/) 11 | -------------------------------------------------------------------------------- /application/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Deny from all 6 | -------------------------------------------------------------------------------- /application/config/doctypes.php: -------------------------------------------------------------------------------- 1 | '', 6 | 'xhtml1-strict' => '', 7 | 'xhtml1-trans' => '', 8 | 'xhtml1-frame' => '', 9 | 'xhtml-basic11' => '', 10 | 'html5' => '', 11 | 'html4-strict' => '', 12 | 'html4-trans' => '', 13 | 'html4-frame' => '', 14 | 'mathml1' => '', 15 | 'mathml2' => '', 16 | 'svg10' => '', 17 | 'svg11' => '', 18 | 'svg11-basic' => '', 19 | 'svg11-tiny' => '', 20 | 'xhtml-math-svg-xh' => '', 21 | 'xhtml-math-svg-sh' => '', 22 | 'xhtml-rdfa-1' => '', 23 | 'xhtml-rdfa-2' => '' 24 | ); 25 | -------------------------------------------------------------------------------- /application/config/hooks.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/config/memcached.php: -------------------------------------------------------------------------------- 1 | array( 15 | 'hostname' => '127.0.0.1', 16 | 'port' => '11211', 17 | 'weight' => '1', 18 | ), 19 | ); 20 | -------------------------------------------------------------------------------- /application/config/profiler.php: -------------------------------------------------------------------------------- 1 | my_controller/index 50 | | my-controller/my-method -> my_controller/my_method 51 | */ 52 | $route['default_controller'] = 'welcome'; 53 | $route['404_override'] = ''; 54 | $route['translate_uri_dashes'] = FALSE; 55 | -------------------------------------------------------------------------------- /application/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/core/MY_Router.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/hooks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/english/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/language/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/libraries/dompdf_gen.php: -------------------------------------------------------------------------------- 1 | dompdf = $pdf; 31 | 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /application/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/logs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/modules/auth/views/change_password.php: -------------------------------------------------------------------------------- 1 |

2 | 3 |
4 | 5 | 6 | 7 |

8 |
9 | 10 |

11 | 12 |

13 |
14 | 15 |

16 | 17 |

18 |
19 | 20 |

21 | 22 | 23 |

24 | 25 | 26 | -------------------------------------------------------------------------------- /application/modules/auth/views/create_group.php: -------------------------------------------------------------------------------- 1 |

2 |

3 | 4 |
5 | 6 | 7 | 8 |

9 |
10 | 11 |

12 | 13 |

14 |
15 | 16 |

17 | 18 |

19 | 20 | -------------------------------------------------------------------------------- /application/modules/auth/views/create_user.php: -------------------------------------------------------------------------------- 1 |

2 |

3 | 4 |
5 | 6 | 7 | 8 |

9 |
10 | 11 |

12 | 13 |

14 |
15 | 16 |

17 | 18 |

19 |
20 | 21 |

22 | 23 |

24 |
25 | 26 |

27 | 28 |

29 |
30 | 31 |

32 | 33 |

34 |
35 | 36 |

37 | 38 |

39 |
40 | 41 |

42 | 43 | 44 |

45 | 46 | 47 | -------------------------------------------------------------------------------- /application/modules/auth/views/deactivate_user.php: -------------------------------------------------------------------------------- 1 |

2 |

username);?>

3 | 4 | id);?> 5 | 6 |

7 | 8 | 9 | 10 | 11 |

12 | 13 | 14 | $user->id)); ?> 15 | 16 |

17 | 18 | -------------------------------------------------------------------------------- /application/modules/auth/views/edit_group.php: -------------------------------------------------------------------------------- 1 |

2 |

3 | 4 |
5 | 6 | 7 | 8 |

9 |
10 | 11 |

12 | 13 |

14 |
15 | 16 |

17 | 18 |

19 | 20 | -------------------------------------------------------------------------------- /application/modules/auth/views/edit_user.php: -------------------------------------------------------------------------------- 1 |

2 |

3 | 4 |
5 | 6 | 7 | 8 |

9 |
10 | 11 |

12 | 13 |

14 |
15 | 16 |

17 | 18 |

19 |
20 | 21 |

22 | 23 |

24 |
25 | 26 |

27 | 28 |

29 |
30 | 31 |

32 | 33 |

34 |
35 | 36 |

37 | 38 | ion_auth->is_admin()): ?> 39 | 40 |

41 | 42 | 57 | 58 | 59 | 60 | 61 | id);?> 62 | 63 | 64 |

65 | 66 | 67 | -------------------------------------------------------------------------------- /application/modules/auth/views/email/activate.tpl.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 |

5 | 6 | -------------------------------------------------------------------------------- /application/modules/auth/views/email/forgot_password.tpl.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 |

5 | 6 | -------------------------------------------------------------------------------- /application/modules/auth/views/email/new_password.tpl.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | 5 |

6 | 7 | -------------------------------------------------------------------------------- /application/modules/auth/views/forgot_password.php: -------------------------------------------------------------------------------- 1 |

2 |

3 | 4 |
5 | 6 | 7 | 8 |

9 |
10 | 11 |

12 | 13 |

14 | 15 | -------------------------------------------------------------------------------- /application/modules/auth/views/index.php: -------------------------------------------------------------------------------- 1 |

2 |

3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | 29 |
first_name,ENT_QUOTES,'UTF-8');?>last_name,ENT_QUOTES,'UTF-8');?>email,ENT_QUOTES,'UTF-8');?> 21 | groups as $group):?> 22 | id, htmlspecialchars($group->name,ENT_QUOTES,'UTF-8')) ;?>
23 | 24 |
active) ? anchor("auth/deactivate/".$user->id, lang('index_active_link')) : anchor("auth/activate/". $user->id, lang('index_inactive_link'));?>id, 'Edit') ;?>
30 | 31 |

|

-------------------------------------------------------------------------------- /application/modules/auth/views/login.php: -------------------------------------------------------------------------------- 1 |

2 |

3 | 4 |
5 | 6 | 7 | 8 |

9 | 10 | 11 |

12 | 13 |

14 | 15 | 16 |

17 | 18 |

19 | 20 | 21 |

22 | 23 | 24 |

25 | 26 | 27 | 28 |

-------------------------------------------------------------------------------- /application/modules/auth/views/reset_password.php: -------------------------------------------------------------------------------- 1 |

2 | 3 |
4 | 5 | 6 | 7 |

8 |
9 | 10 |

11 | 12 |

13 |
14 | 15 |

16 | 17 | 18 | 19 | 20 |

21 | 22 | -------------------------------------------------------------------------------- /application/modules/welcome/controllers/Welcome.php: -------------------------------------------------------------------------------- 1 | 19 | * @see http://codeigniter.com/user_guide/general/urls.html 20 | */ 21 | public function index() 22 | { 23 | $this->load->view('welcome_message'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /application/third_party/MX/Base.php: -------------------------------------------------------------------------------- 1 | config->item('controller_suffix'), '', get_class($this)); 46 | log_message('debug', $class." MX_Controller Initialized"); 47 | Modules::$registry[strtolower($class)] = $this; 48 | 49 | /* copy a loader instance and initialize */ 50 | $this->load = clone load_class('Loader'); 51 | $this->load->initialize($this); 52 | 53 | /* autoload module items */ 54 | $this->load->_autoloader($this->autoload); 55 | } 56 | 57 | public function __get($class) 58 | { 59 | return CI::$APP->$class; 60 | } 61 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/.gitattributes: -------------------------------------------------------------------------------- 1 | *.json text 2 | *.xml text 3 | *.php text 4 | *.LGPL text 5 | *.md text 6 | *.skel text 7 | *.css text 8 | *.inc text 9 | *.js text 10 | *.html text 11 | *.txt text 12 | *.svg text 13 | 14 | -------------------------------------------------------------------------------- /application/third_party/dompdf/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | composer.lock 3 | vendor 4 | .idea 5 | .project 6 | lib/fonts/*.afm.php 7 | lib/fonts/*.ufm.php 8 | lib/fonts/log.htm 9 | -------------------------------------------------------------------------------- /application/third_party/dompdf/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/php-font-lib"] 2 | path = lib/php-font-lib 3 | url = https://github.com/PhenX/php-font-lib.git 4 | -------------------------------------------------------------------------------- /application/third_party/dompdf/dompdf_config.custom.inc.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Fabien Ménager 7 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 8 | */ 9 | 10 | /** 11 | * DOMPDF autoload function 12 | * 13 | * If you have an existing autoload function, add a call to this function 14 | * from your existing __autoload() implementation. 15 | * 16 | * @param string $class 17 | */ 18 | function DOMPDF_autoload($class) { 19 | $filename = DOMPDF_INC_DIR . "/" . mb_strtolower($class) . ".cls.php"; 20 | 21 | if ( is_file($filename) ) { 22 | include_once $filename; 23 | } 24 | } 25 | 26 | // If SPL autoload functions are available (PHP >= 5.1.2) 27 | if ( function_exists("spl_autoload_register") ) { 28 | $autoload = "DOMPDF_autoload"; 29 | $funcs = spl_autoload_functions(); 30 | 31 | // No functions currently in the stack. 32 | if ( !DOMPDF_AUTOLOAD_PREPEND || $funcs === false ) { 33 | spl_autoload_register($autoload); 34 | } 35 | 36 | // If PHP >= 5.3 the $prepend argument is available 37 | else if ( PHP_VERSION_ID >= 50300 ) { 38 | spl_autoload_register($autoload, true, true); 39 | } 40 | 41 | else { 42 | // Unregister existing autoloaders... 43 | $compat = (PHP_VERSION_ID <= 50102 && PHP_VERSION_ID >= 50100); 44 | 45 | foreach ($funcs as $func) { 46 | if (is_array($func)) { 47 | // :TRICKY: There are some compatibility issues and some 48 | // places where we need to error out 49 | $reflector = new ReflectionMethod($func[0], $func[1]); 50 | if (!$reflector->isStatic()) { 51 | throw new Exception('This function is not compatible with non-static object methods due to PHP Bug #44144.'); 52 | } 53 | 54 | // Suprisingly, spl_autoload_register supports the 55 | // Class::staticMethod callback format, although call_user_func doesn't 56 | if ($compat) $func = implode('::', $func); 57 | } 58 | 59 | spl_autoload_unregister($func); 60 | } 61 | 62 | // Register the new one, thus putting it at the front of the stack... 63 | spl_autoload_register($autoload); 64 | 65 | // Now, go back and re-register all of our old ones. 66 | foreach ($funcs as $func) { 67 | spl_autoload_register($func); 68 | } 69 | 70 | // Be polite and ensure that userland autoload gets retained 71 | if ( function_exists("__autoload") ) { 72 | spl_autoload_register("__autoload"); 73 | } 74 | } 75 | } 76 | 77 | else if ( !function_exists("__autoload") ) { 78 | /** 79 | * Default __autoload() function 80 | * 81 | * @param string $class 82 | */ 83 | function __autoload($class) { 84 | DOMPDF_autoload($class); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/block_positioner.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Positions block frames 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Block_Positioner extends Positioner { 16 | 17 | 18 | function __construct(Frame_Decorator $frame) { parent::__construct($frame); } 19 | 20 | //........................................................................ 21 | 22 | function position() { 23 | $frame = $this->_frame; 24 | $style = $frame->get_style(); 25 | $cb = $frame->get_containing_block(); 26 | $p = $frame->find_block_parent(); 27 | 28 | if ( $p ) { 29 | $float = $style->float; 30 | 31 | $enable_css_float = $frame->get_dompdf()->get_option("enable_css_float"); 32 | if ( !$enable_css_float || !$float || $float === "none" ) { 33 | $p->add_line(true); 34 | } 35 | $y = $p->get_current_line_box()->y; 36 | 37 | } 38 | else { 39 | $y = $cb["y"]; 40 | } 41 | 42 | $x = $cb["x"]; 43 | 44 | // Relative positionning 45 | if ( $style->position === "relative" ) { 46 | $top = $style->length_in_pt($style->top, $cb["h"]); 47 | //$right = $style->length_in_pt($style->right, $cb["w"]); 48 | //$bottom = $style->length_in_pt($style->bottom, $cb["h"]); 49 | $left = $style->length_in_pt($style->left, $cb["w"]); 50 | 51 | $x += $left; 52 | $y += $top; 53 | } 54 | 55 | $frame->set_position($x, $y); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/canvas_factory.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Create canvas instances 11 | * 12 | * The canvas factory creates canvas instances based on the 13 | * availability of rendering backends and config options. 14 | * 15 | * @package dompdf 16 | */ 17 | class Canvas_Factory { 18 | 19 | /** 20 | * Constructor is private: this is a static class 21 | */ 22 | private function __construct() { } 23 | 24 | /** 25 | * @param DOMPDF $dompdf 26 | * @param string|array $paper 27 | * @param string $orientation 28 | * @param string $class 29 | * 30 | * @return Canvas 31 | */ 32 | static function get_instance(DOMPDF $dompdf, $paper = null, $orientation = null, $class = null) { 33 | 34 | $backend = strtolower(DOMPDF_PDF_BACKEND); 35 | 36 | if ( isset($class) && class_exists($class, false) ) { 37 | $class .= "_Adapter"; 38 | } 39 | 40 | else if ( (DOMPDF_PDF_BACKEND === "auto" || $backend === "pdflib" ) && 41 | class_exists("PDFLib", false) ) { 42 | $class = "PDFLib_Adapter"; 43 | } 44 | 45 | // FIXME The TCPDF adapter is not ready yet 46 | //else if ( (DOMPDF_PDF_BACKEND === "auto" || $backend === "cpdf") ) 47 | // $class = "CPDF_Adapter"; 48 | 49 | else if ( $backend === "tcpdf" ) { 50 | $class = "TCPDF_Adapter"; 51 | } 52 | 53 | else if ( $backend === "gd" ) { 54 | $class = "GD_Adapter"; 55 | } 56 | 57 | else { 58 | $class = "CPDF_Adapter"; 59 | } 60 | 61 | return new $class($paper, $orientation, $dompdf); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/dompdf_exception.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Standard exception thrown by DOMPDF classes 11 | * 12 | * @package dompdf 13 | */ 14 | class DOMPDF_Exception extends Exception { 15 | 16 | /** 17 | * Class constructor 18 | * 19 | * @param string $message Error message 20 | * @param int $code Error code 21 | */ 22 | function __construct($message = null, $code = 0) { 23 | parent::__construct($message, $code); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/dompdf_image_exception.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Image exception thrown by DOMPDF 11 | * 12 | * @package dompdf 13 | */ 14 | class DOMPDF_Image_Exception extends DOMPDF_Exception { 15 | 16 | /** 17 | * Class constructor 18 | * 19 | * @param string $message Error message 20 | * @param int $code Error code 21 | */ 22 | function __construct($message = null, $code = 0) { 23 | parent::__construct($message, $code); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/file.skel: -------------------------------------------------------------------------------- 1 | 6 | * @author ... 7 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 8 | */ 9 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/image_frame_decorator.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Fabien Ménager 7 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 8 | */ 9 | 10 | /** 11 | * Decorates frames for image layout and rendering 12 | * 13 | * @access private 14 | * @package dompdf 15 | */ 16 | class Image_Frame_Decorator extends Frame_Decorator { 17 | 18 | /** 19 | * The path to the image file (note that remote images are 20 | * downloaded locally to DOMPDF_TEMP_DIR). 21 | * 22 | * @var string 23 | */ 24 | protected $_image_url; 25 | 26 | /** 27 | * The image's file error message 28 | * 29 | * @var string 30 | */ 31 | protected $_image_msg; 32 | 33 | /** 34 | * Class constructor 35 | * 36 | * @param Frame $frame the frame to decorate 37 | * @param DOMPDF $dompdf the document's dompdf object (required to resolve relative & remote urls) 38 | */ 39 | function __construct(Frame $frame, DOMPDF $dompdf) { 40 | parent::__construct($frame, $dompdf); 41 | $url = $frame->get_node()->getAttribute("src"); 42 | 43 | $debug_png = $dompdf->get_option("debug_png"); 44 | if ($debug_png) print '[__construct '.$url.']'; 45 | 46 | list($this->_image_url, /*$type*/, $this->_image_msg) = Image_Cache::resolve_url( 47 | $url, 48 | $dompdf->get_protocol(), 49 | $dompdf->get_host(), 50 | $dompdf->get_base_path(), 51 | $dompdf 52 | ); 53 | 54 | if ( Image_Cache::is_broken($this->_image_url) && 55 | $alt = $frame->get_node()->getAttribute("alt") ) { 56 | $style = $frame->get_style(); 57 | $style->width = (4/3)*Font_Metrics::get_text_width($alt, $style->font_family, $style->font_size, $style->word_spacing); 58 | $style->height = Font_Metrics::get_font_height($style->font_family, $style->font_size); 59 | } 60 | } 61 | 62 | /** 63 | * Return the image's url 64 | * 65 | * @return string The url of this image 66 | */ 67 | function get_image_url() { 68 | return $this->_image_url; 69 | } 70 | 71 | /** 72 | * Return the image's error message 73 | * 74 | * @return string The image's error message 75 | */ 76 | function get_image_msg() { 77 | return $this->_image_msg; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/inline_frame_decorator.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Helmut Tischer 7 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 8 | */ 9 | 10 | /** 11 | * Decorates frames for inline layout 12 | * 13 | * @access private 14 | * @package dompdf 15 | */ 16 | class Inline_Frame_Decorator extends Frame_Decorator { 17 | 18 | function __construct(Frame $frame, DOMPDF $dompdf) { parent::__construct($frame, $dompdf); } 19 | 20 | function split(Frame $frame = null, $force_pagebreak = false) { 21 | 22 | if ( is_null($frame) ) { 23 | $this->get_parent()->split($this, $force_pagebreak); 24 | return; 25 | } 26 | 27 | if ( $frame->get_parent() !== $this ) 28 | throw new DOMPDF_Exception("Unable to split: frame is not a child of this one."); 29 | 30 | $split = $this->copy( $this->_frame->get_node()->cloneNode() ); 31 | $this->get_parent()->insert_child_after($split, $this); 32 | 33 | // Unset the current node's right style properties 34 | $style = $this->_frame->get_style(); 35 | $style->margin_right = 0; 36 | $style->padding_right = 0; 37 | $style->border_right_width = 0; 38 | 39 | // Unset the split node's left style properties since we don't want them 40 | // to propagate 41 | $style = $split->get_style(); 42 | $style->margin_left = 0; 43 | $style->padding_left = 0; 44 | $style->border_left_width = 0; 45 | 46 | //On continuation of inline element on next line, 47 | //don't repeat non-vertically repeatble background images 48 | //See e.g. in testcase image_variants, long desriptions 49 | if ( ($url = $style->background_image) && $url !== "none" 50 | && ($repeat = $style->background_repeat) && $repeat !== "repeat" && $repeat !== "repeat-y" 51 | ) { 52 | $style->background_image = "none"; 53 | } 54 | 55 | // Add $frame and all following siblings to the new split node 56 | $iter = $frame; 57 | while ($iter) { 58 | $frame = $iter; 59 | $iter = $iter->get_next_sibling(); 60 | $frame->reset(); 61 | $split->append_child($frame); 62 | } 63 | 64 | $page_breaks = array("always", "left", "right"); 65 | $frame_style = $frame->get_style(); 66 | if( $force_pagebreak || 67 | in_array($frame_style->page_break_before, $page_breaks) || 68 | in_array($frame_style->page_break_after, $page_breaks) ) { 69 | 70 | $this->get_parent()->split($split, true); 71 | } 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/inline_frame_reflower.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Reflows inline frames 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Inline_Frame_Reflower extends Frame_Reflower { 16 | 17 | function __construct(Frame $frame) { parent::__construct($frame); } 18 | 19 | //........................................................................ 20 | 21 | function reflow(Block_Frame_Decorator $block = null) { 22 | $frame = $this->_frame; 23 | 24 | // Check if a page break is forced 25 | $page = $frame->get_root(); 26 | $page->check_forced_page_break($frame); 27 | 28 | if ( $page->is_full() ) 29 | return; 30 | 31 | $style = $frame->get_style(); 32 | 33 | // Generated content 34 | $this->_set_content(); 35 | 36 | $frame->position(); 37 | 38 | $cb = $frame->get_containing_block(); 39 | 40 | // Add our margin, padding & border to the first and last children 41 | if ( ($f = $frame->get_first_child()) && $f instanceof Text_Frame_Decorator ) { 42 | $f_style = $f->get_style(); 43 | $f_style->margin_left = $style->margin_left; 44 | $f_style->padding_left = $style->padding_left; 45 | $f_style->border_left = $style->border_left; 46 | } 47 | 48 | if ( ($l = $frame->get_last_child()) && $l instanceof Text_Frame_Decorator ) { 49 | $l_style = $l->get_style(); 50 | $l_style->margin_right = $style->margin_right; 51 | $l_style->padding_right = $style->padding_right; 52 | $l_style->border_right = $style->border_right; 53 | } 54 | 55 | if ( $block ) { 56 | $block->add_frame_to_line($this->_frame); 57 | } 58 | 59 | // Set the containing blocks and reflow each child. The containing 60 | // block is not changed by line boxes. 61 | foreach ( $frame->get_children() as $child ) { 62 | $child->set_containing_block($cb); 63 | $child->reflow($block); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/inline_positioner.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Positions inline frames 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Inline_Positioner extends Positioner { 16 | 17 | function __construct(Frame_Decorator $frame) { parent::__construct($frame); } 18 | 19 | //........................................................................ 20 | 21 | function position() { 22 | /** 23 | * Find our nearest block level parent and access its lines property. 24 | * @var Block_Frame_Decorator 25 | */ 26 | $p = $this->_frame->find_block_parent(); 27 | 28 | // Debugging code: 29 | 30 | // pre_r("\nPositioning:"); 31 | // pre_r("Me: " . $this->_frame->get_node()->nodeName . " (" . spl_object_hash($this->_frame->get_node()) . ")"); 32 | // pre_r("Parent: " . $p->get_node()->nodeName . " (" . spl_object_hash($p->get_node()) . ")"); 33 | 34 | // End debugging 35 | 36 | if ( !$p ) 37 | throw new DOMPDF_Exception("No block-level parent found. Not good."); 38 | 39 | $f = $this->_frame; 40 | 41 | $cb = $f->get_containing_block(); 42 | $line = $p->get_current_line_box(); 43 | 44 | // Skip the page break if in a fixed position element 45 | $is_fixed = false; 46 | while($f = $f->get_parent()) { 47 | if($f->get_style()->position === "fixed") { 48 | $is_fixed = true; 49 | break; 50 | } 51 | } 52 | 53 | $f = $this->_frame; 54 | 55 | if ( !$is_fixed && $f->get_parent() && 56 | $f->get_parent() instanceof Inline_Frame_Decorator && 57 | $f->is_text_node() ) { 58 | 59 | $min_max = $f->get_reflower()->get_min_max_width(); 60 | 61 | // If the frame doesn't fit in the current line, a line break occurs 62 | if ( $min_max["min"] > ($cb["w"] - $line->left - $line->w - $line->right) ) { 63 | $p->add_line(); 64 | } 65 | } 66 | 67 | $f->set_position($cb["x"] + $line->w, $line->y); 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/javascript_embedder.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Embeds Javascript into the PDF document 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Javascript_Embedder { 16 | 17 | /** 18 | * @var DOMPDF 19 | */ 20 | protected $_dompdf; 21 | 22 | function __construct(DOMPDF $dompdf) { 23 | $this->_dompdf = $dompdf; 24 | } 25 | 26 | function insert($script) { 27 | $this->_dompdf->get_canvas()->javascript($script); 28 | } 29 | 30 | function render(Frame $frame) { 31 | if ( !$this->_dompdf->get_option("enable_javascript") ) { 32 | return; 33 | } 34 | 35 | $this->insert($frame->get_node()->nodeValue); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/list_bullet_frame_decorator.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Helmut Tischer 7 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 8 | */ 9 | 10 | /** 11 | * Decorates frames for list bullet rendering 12 | * 13 | * @access private 14 | * @package dompdf 15 | */ 16 | class List_Bullet_Frame_Decorator extends Frame_Decorator { 17 | 18 | const BULLET_PADDING = 1; // Distance from bullet to text in pt 19 | // As fraction of font size (including descent). See also DECO_THICKNESS. 20 | const BULLET_THICKNESS = 0.04; // Thickness of bullet outline. Screen: 0.08, print: better less, e.g. 0.04 21 | const BULLET_DESCENT = 0.3; //descent of font below baseline. Todo: Guessed for now. 22 | const BULLET_SIZE = 0.35; // bullet diameter. For now 0.5 of font_size without descent. 23 | 24 | static $BULLET_TYPES = array("disc", "circle", "square"); 25 | 26 | //........................................................................ 27 | 28 | function __construct(Frame $frame, DOMPDF $dompdf) { 29 | parent::__construct($frame, $dompdf); 30 | } 31 | 32 | function get_margin_width() { 33 | $style = $this->_frame->get_style(); 34 | 35 | // Small hack to prevent extra indenting of list text on list_style_position === "inside" 36 | // and on suppressed bullet 37 | if ( $style->list_style_position === "outside" || 38 | $style->list_style_type === "none" ) { 39 | return 0; 40 | } 41 | 42 | return $style->get_font_size() * self::BULLET_SIZE + 2 * self::BULLET_PADDING; 43 | } 44 | 45 | //hits only on "inset" lists items, to increase height of box 46 | function get_margin_height() { 47 | $style = $this->_frame->get_style(); 48 | 49 | if ( $style->list_style_type === "none" ) { 50 | return 0; 51 | } 52 | 53 | return $style->get_font_size() * self::BULLET_SIZE + 2 * self::BULLET_PADDING; 54 | } 55 | 56 | function get_width() { 57 | return $this->get_margin_height(); 58 | } 59 | 60 | function get_height() { 61 | return $this->get_margin_height(); 62 | } 63 | 64 | //........................................................................ 65 | } 66 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/list_bullet_frame_reflower.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Reflows list bullets 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class List_Bullet_Frame_Reflower extends Frame_Reflower { 16 | 17 | function __construct(Frame_Decorator $frame) { parent::__construct($frame); } 18 | 19 | //........................................................................ 20 | 21 | function reflow(Block_Frame_Decorator $block = null) { 22 | $style = $this->_frame->get_style(); 23 | 24 | $style->width = $this->_frame->get_width(); 25 | $this->_frame->position(); 26 | 27 | if ( $style->list_style_position === "inside" ) { 28 | $p = $this->_frame->find_block_parent(); 29 | $p->add_frame_to_line($this->_frame); 30 | } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/null_frame_decorator.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Dummy decorator 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Null_Frame_Decorator extends Frame_Decorator { 16 | 17 | function __construct(Frame $frame, DOMPDF $dompdf) { 18 | parent::__construct($frame, $dompdf); 19 | $style = $this->_frame->get_style(); 20 | $style->width = 0; 21 | $style->height = 0; 22 | $style->margin = 0; 23 | $style->padding = 0; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/null_frame_reflower.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Dummy reflower 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Null_Frame_Reflower extends Frame_Reflower { 16 | 17 | function __construct(Frame $frame) { parent::__construct($frame); } 18 | 19 | function reflow(Block_Frame_Decorator $block = null) { return; } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/null_positioner.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Dummy positioner 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Null_Positioner extends Positioner { 16 | 17 | function __construct(Frame_Decorator $frame) { 18 | parent::__construct($frame); 19 | } 20 | 21 | function position() { return; } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/php_evaluator.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Executes inline PHP code during the rendering process 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class PHP_Evaluator { 16 | 17 | /** 18 | * @var Canvas 19 | */ 20 | protected $_canvas; 21 | 22 | function __construct(Canvas $canvas) { 23 | $this->_canvas = $canvas; 24 | } 25 | 26 | function evaluate($code, $vars = array()) { 27 | if ( !$this->_canvas->get_dompdf()->get_option("enable_php") ) { 28 | return; 29 | } 30 | 31 | // Set up some variables for the inline code 32 | $pdf = $this->_canvas; 33 | $PAGE_NUM = $pdf->get_page_number(); 34 | $PAGE_COUNT = $pdf->get_page_count(); 35 | 36 | // Override those variables if passed in 37 | foreach ($vars as $k => $v) { 38 | $$k = $v; 39 | } 40 | 41 | //$code = html_entity_decode($code); // @todo uncomment this when tested 42 | eval($code); 43 | } 44 | 45 | function render(Frame $frame) { 46 | $this->evaluate($frame->get_node()->nodeValue); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/positioner.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Base Positioner class 11 | * 12 | * Defines postioner interface 13 | * 14 | * @access private 15 | * @package dompdf 16 | */ 17 | abstract class Positioner { 18 | 19 | /** 20 | * @var Frame_Decorator 21 | */ 22 | protected $_frame; 23 | 24 | //........................................................................ 25 | 26 | function __construct(Frame_Decorator $frame) { 27 | $this->_frame = $frame; 28 | } 29 | 30 | /** 31 | * Class destructor 32 | */ 33 | function __destruct() { 34 | clear_object($this); 35 | } 36 | //........................................................................ 37 | 38 | abstract function position(); 39 | 40 | function move($offset_x, $offset_y, $ignore_self = false) { 41 | list($x, $y) = $this->_frame->get_position(); 42 | 43 | if ( !$ignore_self ) { 44 | $this->_frame->set_position($x + $offset_x, $y + $offset_y); 45 | } 46 | 47 | foreach($this->_frame->get_children() as $child) { 48 | $child->move($offset_x, $offset_y); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/table_cell_positioner.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Positions table cells 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Table_Cell_Positioner extends Positioner { 16 | 17 | function __construct(Frame_Decorator $frame) { parent::__construct($frame); } 18 | 19 | //........................................................................ 20 | 21 | function position() { 22 | 23 | $table = Table_Frame_Decorator::find_parent_table($this->_frame); 24 | $cellmap = $table->get_cellmap(); 25 | $this->_frame->set_position($cellmap->get_frame_position($this->_frame)); 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/table_row_frame_decorator.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Decorates Frames for table row layout 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Table_Row_Frame_Decorator extends Frame_Decorator { 16 | 17 | // protected members 18 | 19 | function __construct(Frame $frame, DOMPDF $dompdf) { 20 | parent::__construct($frame, $dompdf); 21 | } 22 | 23 | //........................................................................ 24 | 25 | /** 26 | * Remove all non table-cell frames from this row and move them after 27 | * the table. 28 | */ 29 | function normalise() { 30 | 31 | // Find our table parent 32 | $p = Table_Frame_Decorator::find_parent_table($this); 33 | 34 | $erroneous_frames = array(); 35 | foreach ($this->get_children() as $child) { 36 | $display = $child->get_style()->display; 37 | 38 | if ( $display !== "table-cell" ) 39 | $erroneous_frames[] = $child; 40 | } 41 | 42 | // dump the extra nodes after the table. 43 | foreach ($erroneous_frames as $frame) 44 | $p->move_after($frame); 45 | } 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/table_row_frame_reflower.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Reflows table rows 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Table_Row_Frame_Reflower extends Frame_Reflower { 16 | 17 | 18 | function __construct(Table_Row_Frame_Decorator $frame) { 19 | parent::__construct($frame); 20 | } 21 | 22 | //........................................................................ 23 | 24 | function reflow(Block_Frame_Decorator $block = null) { 25 | $page = $this->_frame->get_root(); 26 | 27 | if ( $page->is_full() ) 28 | return; 29 | 30 | $this->_frame->position(); 31 | $style = $this->_frame->get_style(); 32 | $cb = $this->_frame->get_containing_block(); 33 | 34 | foreach ($this->_frame->get_children() as $child) { 35 | 36 | if ( $page->is_full() ) 37 | return; 38 | 39 | $child->set_containing_block($cb); 40 | $child->reflow(); 41 | 42 | } 43 | 44 | if ( $page->is_full() ) 45 | return; 46 | 47 | $table = Table_Frame_Decorator::find_parent_table($this->_frame); 48 | $cellmap = $table->get_cellmap(); 49 | $style->width = $cellmap->get_frame_width($this->_frame); 50 | $style->height = $cellmap->get_frame_height($this->_frame); 51 | 52 | $this->_frame->set_position($cellmap->get_frame_position($this->_frame)); 53 | 54 | } 55 | 56 | //........................................................................ 57 | 58 | function get_min_max_width() { 59 | throw new DOMPDF_Exception("Min/max width is undefined for table rows"); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/table_row_group_frame_decorator.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Table row group decorator 11 | * 12 | * Overrides split() method for tbody, thead & tfoot elements 13 | * 14 | * @access private 15 | * @package dompdf 16 | */ 17 | class Table_Row_Group_Frame_Decorator extends Frame_Decorator { 18 | 19 | /** 20 | * Class constructor 21 | * 22 | * @param Frame $frame Frame to decorate 23 | * @param DOMPDF $dompdf Current dompdf instance 24 | */ 25 | function __construct(Frame $frame, DOMPDF $dompdf) { 26 | parent::__construct($frame, $dompdf); 27 | } 28 | 29 | /** 30 | * Override split() to remove all child rows and this element from the cellmap 31 | * 32 | * @param Frame $child 33 | * @param bool $force_pagebreak 34 | * 35 | * @return void 36 | */ 37 | function split(Frame $child = null, $force_pagebreak = false) { 38 | 39 | if ( is_null($child) ) { 40 | parent::split(); 41 | return; 42 | } 43 | 44 | // Remove child & all subsequent rows from the cellmap 45 | $cellmap = $this->get_parent()->get_cellmap(); 46 | $iter = $child; 47 | 48 | while ( $iter ) { 49 | $cellmap->remove_row($iter); 50 | $iter = $iter->get_next_sibling(); 51 | } 52 | 53 | // If we are splitting at the first child remove the 54 | // table-row-group from the cellmap as well 55 | if ( $child === $this->get_first_child() ) { 56 | $cellmap->remove_row_group($this); 57 | parent::split(); 58 | return; 59 | } 60 | 61 | $cellmap->update_row_group($this, $child->get_prev_sibling()); 62 | parent::split($child); 63 | 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/table_row_group_frame_reflower.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Reflows table row groups (e.g. tbody tags) 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Table_Row_Group_Frame_Reflower extends Frame_Reflower { 16 | 17 | function __construct($frame) { 18 | parent::__construct($frame); 19 | } 20 | 21 | function reflow(Block_Frame_Decorator $block = null) { 22 | $page = $this->_frame->get_root(); 23 | 24 | $style = $this->_frame->get_style(); 25 | 26 | // Our width is equal to the width of our parent table 27 | $table = Table_Frame_Decorator::find_parent_table($this->_frame); 28 | 29 | $cb = $this->_frame->get_containing_block(); 30 | 31 | foreach ( $this->_frame->get_children() as $child) { 32 | // Bail if the page is full 33 | if ( $page->is_full() ) 34 | return; 35 | 36 | $child->set_containing_block($cb["x"], $cb["y"], $cb["w"], $cb["h"]); 37 | $child->reflow(); 38 | 39 | // Check if a split has occured 40 | $page->check_page_break($child); 41 | 42 | } 43 | 44 | if ( $page->is_full() ) 45 | return; 46 | 47 | $cellmap = $table->get_cellmap(); 48 | $style->width = $cellmap->get_frame_width($this->_frame); 49 | $style->height = $cellmap->get_frame_height($this->_frame); 50 | 51 | $this->_frame->set_position($cellmap->get_frame_position($this->_frame)); 52 | 53 | if ( $table->get_style()->border_collapse === "collapse" ) 54 | // Unset our borders because our cells are now using them 55 | $style->border_style = "none"; 56 | 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/table_row_group_renderer.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Renders block frames 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Table_Row_Group_Renderer extends Block_Renderer { 16 | 17 | //........................................................................ 18 | 19 | function render(Frame $frame) { 20 | $style = $frame->get_style(); 21 | 22 | $this->_set_opacity( $frame->get_opacity( $style->opacity ) ); 23 | 24 | $this->_render_border($frame); 25 | $this->_render_outline($frame); 26 | 27 | if (DEBUG_LAYOUT && DEBUG_LAYOUT_BLOCKS) { 28 | $this->_debug_layout($frame->get_border_box(), "red"); 29 | if (DEBUG_LAYOUT_PADDINGBOX) { 30 | $this->_debug_layout($frame->get_padding_box(), "red", array(0.5, 0.5)); 31 | } 32 | } 33 | 34 | if (DEBUG_LAYOUT && DEBUG_LAYOUT_LINES && $frame->get_decorator()) { 35 | foreach ($frame->get_decorator()->get_line_boxes() as $line) { 36 | $frame->_debug_layout(array($line->x, $line->y, $line->w, $line->h), "orange"); 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /application/third_party/dompdf/include/table_row_positioner.cls.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | /** 10 | * Positions table rows 11 | * 12 | * @access private 13 | * @package dompdf 14 | */ 15 | class Table_Row_Positioner extends Positioner { 16 | 17 | function __construct(Frame_Decorator $frame) { parent::__construct($frame); } 18 | 19 | //........................................................................ 20 | 21 | function position() { 22 | 23 | $cb = $this->_frame->get_containing_block(); 24 | $p = $this->_frame->get_prev_sibling(); 25 | 26 | if ( $p ) 27 | $y = $p->get_position("y") + $p->get_margin_height(); 28 | 29 | else 30 | $y = $cb["y"]; 31 | 32 | $this->_frame->set_position($cb["x"], $y); 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /application/third_party/dompdf/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSans-Bold.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSans-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSans-BoldOblique.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSans-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSans-ExtraLight.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSans-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSans-Oblique.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSans.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSansCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSansCondensed-Bold.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSansCondensed-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSansCondensed-BoldOblique.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSansCondensed-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSansCondensed-Oblique.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSansCondensed.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSansCondensed.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSansMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSansMono-Bold.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSansMono-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSansMono-BoldOblique.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSansMono-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSansMono-Oblique.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSansMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSansMono.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSerif-Bold.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSerif-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSerif-BoldItalic.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSerif-Italic.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSerif.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSerif.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSerifCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSerifCondensed-Bold.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSerifCondensed-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSerifCondensed-BoldItalic.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSerifCondensed-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSerifCondensed-Italic.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/DejaVuSerifCondensed.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/fonts/DejaVuSerifCondensed.ttf -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/fonts/mustRead.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Core 14 AFM Files - ReadMe 6 | 7 | 8 | or 9 | 10 | 11 | 12 | 13 | 14 |
This file and the 14 PostScript(R) AFM files it accompanies may be used, copied, and distributed for any purpose and without charge, with or without modification, provided that all copyright notices are retained; that the AFM files are not distributed without this file; that all modifications to this file or any of the AFM files are prominently noted in the modified file(s); and that this paragraph is not modified. Adobe Systems has no responsibility or obligation to support the use of the AFM files. Col
15 |

Source http://www.adobe.com/devnet/font/#pcfi

16 | 17 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/html5lib/Parser.php: -------------------------------------------------------------------------------- 1 | parse(); 22 | return $tokenizer->save(); 23 | } 24 | /** 25 | * Parses an HTML fragment. 26 | * @param $text HTML text to parse 27 | * @param $context String name of context element to pretend parsing is in. 28 | * @param $builder Custom builder implementation 29 | * @return Parsed HTML as DOMDocument 30 | */ 31 | static public function parseFragment($text, $context = null, $builder = null) { 32 | $tokenizer = new HTML5_Tokenizer($text, $builder); 33 | $tokenizer->parseFragment($context); 34 | return $tokenizer->save(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Autoloader.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/php-font-lib/classes/Autoloader.php -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/EncodingMap.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib; 10 | 11 | /** 12 | * Encoding map used to map a code point to a Unicode char. 13 | * 14 | * @package php-font-lib 15 | */ 16 | class EncodingMap { 17 | private $f; 18 | 19 | function __construct($file) { 20 | $this->f = fopen($file, "r"); 21 | } 22 | 23 | function parse() { 24 | $map = array(); 25 | 26 | while ($line = fgets($this->f)) { 27 | if (preg_match('/^[\!\=]([0-9A-F]{2,})\s+U\+([0-9A-F]{2})([0-9A-F]{2})\s+([^\s]+)/', $line, $matches)) { 28 | $unicode = (hexdec($matches[2]) << 8) + hexdec($matches[3]); 29 | $map[hexdec($matches[1])] = array($unicode, $matches[4]); 30 | } 31 | } 32 | 33 | ksort($map); 34 | 35 | return $map; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Font.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib; 10 | 11 | /** 12 | * Generic font file. 13 | * 14 | * @package php-font-lib 15 | */ 16 | class Font { 17 | static $debug = false; 18 | 19 | /** 20 | * @param string $file The font file 21 | * 22 | * @return TrueType\File|null $file 23 | */ 24 | public static function load($file) { 25 | $header = file_get_contents($file, false, null, null, 4); 26 | $class = null; 27 | 28 | switch ($header) { 29 | case "\x00\x01\x00\x00": 30 | case "true": 31 | case "typ1": 32 | $class = "TrueType\\File"; 33 | break; 34 | 35 | case "OTTO": 36 | $class = "OpenType\\File"; 37 | break; 38 | 39 | case "wOFF": 40 | $class = "WOFF\\File"; 41 | break; 42 | 43 | case "ttcf": 44 | $class = "TrueType\\Collection"; 45 | break; 46 | 47 | // Unknown type or EOT 48 | default: 49 | $magicNumber = file_get_contents($file, false, null, 34, 2); 50 | 51 | if ($magicNumber === "LP") { 52 | $class = "EOT\\File"; 53 | } 54 | } 55 | 56 | if ($class) { 57 | $class = "FontLib\\$class"; 58 | 59 | /** @var TrueType\File $obj */ 60 | $obj = new $class; 61 | $obj->load($file); 62 | 63 | return $obj; 64 | } 65 | 66 | return null; 67 | } 68 | 69 | static function d($str) { 70 | if (!self::$debug) { 71 | return; 72 | } 73 | echo "$str\n"; 74 | } 75 | 76 | static function UTF16ToUTF8($str) { 77 | return mb_convert_encoding($str, "utf-8", "utf-16"); 78 | } 79 | 80 | static function UTF8ToUTF16($str) { 81 | return mb_convert_encoding($str, "utf-16", "utf-8"); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Glyph/Outline.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | * @version $Id: Font_Table_glyf.php 46 2012-04-02 20:22:38Z fabien.menager $ 8 | */ 9 | namespace FontLib\Glyph; 10 | 11 | use FontLib\Table\Type\glyf; 12 | use FontLib\TrueType\File; 13 | use FontLib\BinaryStream; 14 | 15 | /** 16 | * `glyf` font table. 17 | * 18 | * @package php-font-lib 19 | */ 20 | class Outline extends BinaryStream { 21 | /** 22 | * @var \FontLib\Table\Type\glyf 23 | */ 24 | protected $table; 25 | 26 | protected $offset; 27 | protected $size; 28 | 29 | // Data 30 | public $numberOfContours; 31 | public $xMin; 32 | public $yMin; 33 | public $xMax; 34 | public $yMax; 35 | 36 | public $raw; 37 | 38 | /** 39 | * @param glyf $table 40 | * @param $offset 41 | * @param $size 42 | * 43 | * @return Outline 44 | */ 45 | static function init(glyf $table, $offset, $size) { 46 | $font = $table->getFont(); 47 | $font->seek($offset); 48 | 49 | if ($font->readInt16() > -1) { 50 | /** @var OutlineSimple $glyph */ 51 | $glyph = new OutlineSimple($table, $offset, $size); 52 | } 53 | else { 54 | /** @var OutlineComposite $glyph */ 55 | $glyph = new OutlineComposite($table, $offset, $size); 56 | } 57 | 58 | $glyph->parse(); 59 | 60 | return $glyph; 61 | } 62 | 63 | /** 64 | * @return File 65 | */ 66 | function getFont() { 67 | return $this->table->getFont(); 68 | } 69 | 70 | function __construct(glyf $table, $offset = null, $size = null) { 71 | $this->table = $table; 72 | $this->offset = $offset; 73 | $this->size = $size; 74 | } 75 | 76 | function parse() { 77 | $font = $this->getFont(); 78 | $font->seek($this->offset); 79 | 80 | if (!$this->size) { 81 | return; 82 | } 83 | 84 | $this->raw = $font->read($this->size); 85 | } 86 | 87 | function parseData() { 88 | $font = $this->getFont(); 89 | $font->seek($this->offset); 90 | 91 | $this->numberOfContours = $font->readInt16(); 92 | $this->xMin = $font->readFWord(); 93 | $this->yMin = $font->readFWord(); 94 | $this->xMax = $font->readFWord(); 95 | $this->yMax = $font->readFWord(); 96 | } 97 | 98 | function encode() { 99 | $font = $this->getFont(); 100 | 101 | return $font->write($this->raw, strlen($this->raw)); 102 | } 103 | 104 | function getSVGContours() { 105 | // Inherit 106 | } 107 | 108 | function getGlyphIDs() { 109 | return array(); 110 | } 111 | } 112 | 113 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Glyph/OutlineComponent.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | * @version $Id: Font_Table_glyf.php 46 2012-04-02 20:22:38Z fabien.menager $ 8 | */ 9 | 10 | namespace FontLib\Glyph; 11 | /** 12 | * Glyph outline component 13 | * 14 | * @package php-font-lib 15 | */ 16 | class OutlineComponent { 17 | public $flags; 18 | public $glyphIndex; 19 | public $a, $b, $c, $d, $e, $f; 20 | public $point_compound; 21 | public $point_component; 22 | public $instructions; 23 | 24 | function getMatrix() { 25 | return array( 26 | $this->a, $this->b, 27 | $this->c, $this->d, 28 | $this->e, $this->f, 29 | ); 30 | } 31 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Header.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | namespace FontLib; 9 | 10 | use FontLib\TrueType\File; 11 | 12 | /** 13 | * Font header container. 14 | * 15 | * @package php-font-lib 16 | */ 17 | abstract class Header extends BinaryStream { 18 | /** 19 | * @var File 20 | */ 21 | protected $font; 22 | protected $def = array(); 23 | 24 | public $data; 25 | 26 | public function __construct(File $font) { 27 | $this->font = $font; 28 | } 29 | 30 | public function encode() { 31 | return $this->font->pack($this->def, $this->data); 32 | } 33 | 34 | public function parse() { 35 | $this->data = $this->font->unpack($this->def); 36 | } 37 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/OpenType/File.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\OpenType; 10 | 11 | /** 12 | * Open Type font, the same as a TrueType one. 13 | * 14 | * @package php-font-lib 15 | */ 16 | class File extends \FontLib\TrueType\File { 17 | // 18 | } 19 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/OpenType/TableDirectoryEntry.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\OpenType; 10 | 11 | /** 12 | * Open Type Table directory entry, the same as a TrueType one. 13 | * 14 | * @package php-font-lib 15 | */ 16 | class TableDirectoryEntry extends \FontLib\TrueType\TableDirectoryEntry { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Table/Table.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | namespace FontLib\Table; 9 | 10 | use FontLib\TrueType\File; 11 | use FontLib\Font; 12 | use FontLib\BinaryStream; 13 | 14 | /** 15 | * Generic font table. 16 | * 17 | * @package php-font-lib 18 | */ 19 | class Table extends BinaryStream { 20 | /** 21 | * @var DirectoryEntry 22 | */ 23 | protected $entry; 24 | protected $def = array(); 25 | 26 | public $data; 27 | 28 | final public function __construct(DirectoryEntry $entry) { 29 | $this->entry = $entry; 30 | $entry->setTable($this); 31 | } 32 | 33 | /** 34 | * @return File 35 | */ 36 | public function getFont() { 37 | return $this->entry->getFont(); 38 | } 39 | 40 | protected function _encode() { 41 | if (empty($this->data)) { 42 | Font::d(" >> Table is empty"); 43 | 44 | return 0; 45 | } 46 | 47 | return $this->getFont()->pack($this->def, $this->data); 48 | } 49 | 50 | protected function _parse() { 51 | $this->data = $this->getFont()->unpack($this->def); 52 | } 53 | 54 | protected function _parseRaw() { 55 | $this->data = $this->getFont()->read($this->entry->length); 56 | } 57 | 58 | protected function _encodeRaw() { 59 | return $this->getFont()->write($this->data, $this->entry->length); 60 | } 61 | 62 | public function toHTML() { 63 | return "
" . var_export($this->data, true) . "
"; 64 | } 65 | 66 | final public function encode() { 67 | $this->entry->startWrite(); 68 | 69 | if (false && empty($this->def)) { 70 | $length = $this->_encodeRaw(); 71 | } 72 | else { 73 | $length = $this->_encode(); 74 | } 75 | 76 | $this->entry->endWrite(); 77 | 78 | return $length; 79 | } 80 | 81 | final public function parse() { 82 | $this->entry->startRead(); 83 | 84 | if (false && empty($this->def)) { 85 | $this->_parseRaw(); 86 | } 87 | else { 88 | $this->_parse(); 89 | } 90 | 91 | $this->entry->endRead(); 92 | } 93 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Table/Type/head.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\Table\Type; 10 | use FontLib\Table\Table; 11 | use Exception; 12 | 13 | /** 14 | * `head` font table. 15 | * 16 | * @package php-font-lib 17 | */ 18 | class head extends Table { 19 | protected $def = array( 20 | "tableVersion" => self::Fixed, 21 | "fontRevision" => self::Fixed, 22 | "checkSumAdjustment" => self::uint32, 23 | "magicNumber" => self::uint32, 24 | "flags" => self::uint16, 25 | "unitsPerEm" => self::uint16, 26 | "created" => self::longDateTime, 27 | "modified" => self::longDateTime, 28 | "xMin" => self::FWord, 29 | "yMin" => self::FWord, 30 | "xMax" => self::FWord, 31 | "yMax" => self::FWord, 32 | "macStyle" => self::uint16, 33 | "lowestRecPPEM" => self::uint16, 34 | "fontDirectionHint" => self::int16, 35 | "indexToLocFormat" => self::int16, 36 | "glyphDataFormat" => self::int16, 37 | ); 38 | 39 | protected function _parse() { 40 | parent::_parse(); 41 | 42 | if ($this->data["magicNumber"] != 0x5F0F3CF5) { 43 | throw new Exception("Incorrect magic number (" . dechex($this->data["magicNumber"]) . ")"); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Table/Type/hhea.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\Table\Type; 10 | use FontLib\Table\Table; 11 | 12 | /** 13 | * `hhea` font table. 14 | * 15 | * @package php-font-lib 16 | */ 17 | class hhea extends Table { 18 | protected $def = array( 19 | "version" => self::Fixed, 20 | "ascent" => self::FWord, 21 | "descent" => self::FWord, 22 | "lineGap" => self::FWord, 23 | "advanceWidthMax" => self::uFWord, 24 | "minLeftSideBearing" => self::FWord, 25 | "minRightSideBearing" => self::FWord, 26 | "xMaxExtent" => self::FWord, 27 | "caretSlopeRise" => self::int16, 28 | "caretSlopeRun" => self::int16, 29 | "caretOffset" => self::FWord, 30 | self::int16, 31 | self::int16, 32 | self::int16, 33 | self::int16, 34 | "metricDataFormat" => self::int16, 35 | "numOfLongHorMetrics" => self::uint16, 36 | ); 37 | 38 | function _encode() { 39 | $font = $this->getFont(); 40 | $this->data["numOfLongHorMetrics"] = count($font->getSubset()); 41 | 42 | return parent::_encode(); 43 | } 44 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Table/Type/hmtx.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\Table\Type; 10 | use FontLib\Table\Table; 11 | 12 | /** 13 | * `hmtx` font table. 14 | * 15 | * @package php-font-lib 16 | */ 17 | class hmtx extends Table { 18 | protected function _parse() { 19 | $font = $this->getFont(); 20 | $offset = $font->pos(); 21 | 22 | $numOfLongHorMetrics = $font->getData("hhea", "numOfLongHorMetrics"); 23 | $numGlyphs = $font->getData("maxp", "numGlyphs"); 24 | 25 | $font->seek($offset); 26 | 27 | $data = array(); 28 | for ($gid = 0; $gid < $numOfLongHorMetrics; $gid++) { 29 | $advanceWidth = $font->readUInt16(); 30 | $leftSideBearing = $font->readUInt16(); 31 | $data[$gid] = array($advanceWidth, $leftSideBearing); 32 | } 33 | 34 | if ($numOfLongHorMetrics < $numGlyphs) { 35 | $lastWidth = end($data); 36 | $data = array_pad($data, $numGlyphs, $lastWidth); 37 | } 38 | 39 | $this->data = $data; 40 | } 41 | 42 | protected function _encode() { 43 | $font = $this->getFont(); 44 | $subset = $font->getSubset(); 45 | $data = $this->data; 46 | 47 | $length = 0; 48 | 49 | foreach ($subset as $gid) { 50 | $length += $font->writeUInt16($data[$gid][0]); 51 | $length += $font->writeUInt16($data[$gid][1]); 52 | } 53 | 54 | return $length; 55 | } 56 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Table/Type/kern.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\Table\Type; 10 | use FontLib\Table\Table; 11 | 12 | /** 13 | * `kern` font table. 14 | * 15 | * @package php-font-lib 16 | */ 17 | class kern extends Table { 18 | protected function _parse() { 19 | $font = $this->getFont(); 20 | 21 | $data = $font->unpack(array( 22 | "version" => self::uint16, 23 | "nTables" => self::uint16, 24 | 25 | // only the first subtable will be parsed 26 | "subtableVersion" => self::uint16, 27 | "length" => self::uint16, 28 | "coverage" => self::uint16, 29 | )); 30 | 31 | $data["format"] = ($data["coverage"] >> 8); 32 | 33 | $subtable = array(); 34 | 35 | switch ($data["format"]) { 36 | case 0: 37 | $subtable = $font->unpack(array( 38 | "nPairs" => self::uint16, 39 | "searchRange" => self::uint16, 40 | "entrySelector" => self::uint16, 41 | "rangeShift" => self::uint16, 42 | )); 43 | 44 | $pairs = array(); 45 | $tree = array(); 46 | 47 | for ($i = 0; $i < $subtable["nPairs"]; $i++) { 48 | $left = $font->readUInt16(); 49 | $right = $font->readUInt16(); 50 | $value = $font->readInt16(); 51 | 52 | $pairs[] = array( 53 | "left" => $left, 54 | "right" => $right, 55 | "value" => $value, 56 | ); 57 | 58 | $tree[$left][$right] = $value; 59 | } 60 | 61 | //$subtable["pairs"] = $pairs; 62 | $subtable["tree"] = $tree; 63 | break; 64 | 65 | case 1: 66 | case 2: 67 | case 3: 68 | break; 69 | } 70 | 71 | $data["subtable"] = $subtable; 72 | 73 | $this->data = $data; 74 | } 75 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Table/Type/loca.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\Table\Type; 10 | use FontLib\Table\Table; 11 | 12 | /** 13 | * `loca` font table. 14 | * 15 | * @package php-font-lib 16 | */ 17 | class loca extends Table { 18 | protected function _parse() { 19 | $font = $this->getFont(); 20 | $offset = $font->pos(); 21 | 22 | $indexToLocFormat = $font->getData("head", "indexToLocFormat"); 23 | $numGlyphs = $font->getData("maxp", "numGlyphs"); 24 | 25 | $font->seek($offset); 26 | 27 | $data = array(); 28 | 29 | // 2 bytes 30 | if ($indexToLocFormat == 0) { 31 | $d = $font->read(($numGlyphs + 1) * 2); 32 | $loc = unpack("n*", $d); 33 | 34 | for ($i = 0; $i <= $numGlyphs; $i++) { 35 | $data[] = $loc[$i + 1] * 2; 36 | } 37 | } 38 | 39 | // 4 bytes 40 | else { 41 | if ($indexToLocFormat == 1) { 42 | $d = $font->read(($numGlyphs + 1) * 4); 43 | $loc = unpack("N*", $d); 44 | 45 | for ($i = 0; $i <= $numGlyphs; $i++) { 46 | $data[] = $loc[$i + 1]; 47 | } 48 | } 49 | } 50 | 51 | $this->data = $data; 52 | } 53 | 54 | function _encode() { 55 | $font = $this->getFont(); 56 | $data = $this->data; 57 | 58 | $indexToLocFormat = $font->getData("head", "indexToLocFormat"); 59 | $numGlyphs = $font->getData("maxp", "numGlyphs"); 60 | $length = 0; 61 | 62 | // 2 bytes 63 | if ($indexToLocFormat == 0) { 64 | for ($i = 0; $i <= $numGlyphs; $i++) { 65 | $length += $font->writeUInt16($data[$i] / 2); 66 | } 67 | } 68 | 69 | // 4 bytes 70 | else { 71 | if ($indexToLocFormat == 1) { 72 | for ($i = 0; $i <= $numGlyphs; $i++) { 73 | $length += $font->writeUInt32($data[$i]); 74 | } 75 | } 76 | } 77 | 78 | return $length; 79 | } 80 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Table/Type/maxp.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\Table\Type; 10 | use FontLib\Table\Table; 11 | 12 | /** 13 | * `maxp` font table. 14 | * 15 | * @package php-font-lib 16 | */ 17 | class maxp extends Table { 18 | protected $def = array( 19 | "version" => self::Fixed, 20 | "numGlyphs" => self::uint16, 21 | "maxPoints" => self::uint16, 22 | "maxContours" => self::uint16, 23 | "maxComponentPoints" => self::uint16, 24 | "maxComponentContours" => self::uint16, 25 | "maxZones" => self::uint16, 26 | "maxTwilightPoints" => self::uint16, 27 | "maxStorage" => self::uint16, 28 | "maxFunctionDefs" => self::uint16, 29 | "maxInstructionDefs" => self::uint16, 30 | "maxStackElements" => self::uint16, 31 | "maxSizeOfInstructions" => self::uint16, 32 | "maxComponentElements" => self::uint16, 33 | "maxComponentDepth" => self::uint16, 34 | ); 35 | 36 | function _encode() { 37 | $font = $this->getFont(); 38 | $this->data["numGlyphs"] = count($font->getSubset()); 39 | 40 | return parent::_encode(); 41 | } 42 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Table/Type/nameRecord.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | namespace FontLib\Table\Type; 9 | 10 | use FontLib\Font; 11 | use FontLib\BinaryStream; 12 | 13 | /** 14 | * Font table name record. 15 | * 16 | * @package php-font-lib 17 | */ 18 | class nameRecord extends BinaryStream { 19 | public $platformID; 20 | public $platformSpecificID; 21 | public $languageID; 22 | public $nameID; 23 | public $length; 24 | public $offset; 25 | public $string; 26 | 27 | public static $format = array( 28 | "platformID" => self::uint16, 29 | "platformSpecificID" => self::uint16, 30 | "languageID" => self::uint16, 31 | "nameID" => self::uint16, 32 | "length" => self::uint16, 33 | "offset" => self::uint16, 34 | ); 35 | 36 | public function map($data) { 37 | foreach ($data as $key => $value) { 38 | $this->$key = $value; 39 | } 40 | } 41 | 42 | public function getUTF8() { 43 | return $this->string; 44 | } 45 | 46 | public function getUTF16() { 47 | return Font::UTF8ToUTF16($this->string); 48 | } 49 | 50 | function __toString() { 51 | return $this->string; 52 | } 53 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/Table/Type/os2.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\Table\Type; 10 | use FontLib\Table\Table; 11 | 12 | /** 13 | * `OS/2` font table. 14 | * 15 | * @package php-font-lib 16 | */ 17 | class os2 extends Table { 18 | protected $def = array( 19 | "version" => self::uint16, 20 | "xAvgCharWidth" => self::int16, 21 | "usWeightClass" => self::uint16, 22 | "usWidthClass" => self::uint16, 23 | "fsType" => self::int16, 24 | "ySubscriptXSize" => self::int16, 25 | "ySubscriptYSize" => self::int16, 26 | "ySubscriptXOffset" => self::int16, 27 | "ySubscriptYOffset" => self::int16, 28 | "ySuperscriptXSize" => self::int16, 29 | "ySuperscriptYSize" => self::int16, 30 | "ySuperscriptXOffset" => self::int16, 31 | "ySuperscriptYOffset" => self::int16, 32 | "yStrikeoutSize" => self::int16, 33 | "yStrikeoutPosition" => self::int16, 34 | "sFamilyClass" => self::int16, 35 | "panose" => array(self::uint8, 10), 36 | "ulCharRange" => array(self::uint32, 4), 37 | "achVendID" => array(self::char, 4), 38 | "fsSelection" => self::uint16, 39 | "fsFirstCharIndex" => self::uint16, 40 | "fsLastCharIndex" => self::uint16, 41 | "typoAscender" => self::int16, 42 | "typoDescender" => self::int16, 43 | "typoLineGap" => self::int16, 44 | "winAscent" => self::int16, 45 | "winDescent" => self::int16, 46 | ); 47 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/TrueType/Collection.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\TrueType; 10 | 11 | use Countable; 12 | use FontLib\BinaryStream; 13 | use Iterator; 14 | use OutOfBoundsException; 15 | 16 | /** 17 | * TrueType collection font file. 18 | * 19 | * @package php-font-lib 20 | */ 21 | class Collection extends BinaryStream implements Iterator, Countable { 22 | /** 23 | * Current iterator position. 24 | * 25 | * @var integer 26 | */ 27 | private $position = 0; 28 | 29 | protected $collectionOffsets = array(); 30 | protected $collection = array(); 31 | protected $version; 32 | protected $numFonts; 33 | 34 | function parse() { 35 | if (isset($this->numFonts)) { 36 | return; 37 | } 38 | 39 | $this->read(4); // tag name 40 | 41 | $this->version = $this->readFixed(); 42 | $this->numFonts = $this->readUInt32(); 43 | 44 | for ($i = 0; $i < $this->numFonts; $i++) { 45 | $this->collectionOffsets[] = $this->readUInt32(); 46 | } 47 | } 48 | 49 | /** 50 | * @param int $fontId 51 | * 52 | * @throws OutOfBoundsException 53 | * @return File 54 | */ 55 | function getFont($fontId) { 56 | $this->parse(); 57 | 58 | if (!isset($this->collectionOffsets[$fontId])) { 59 | throw new OutOfBoundsException(); 60 | } 61 | 62 | if (isset($this->collection[$fontId])) { 63 | return $this->collection[$fontId]; 64 | } 65 | 66 | $font = new File(); 67 | $font->f = $this->f; 68 | $font->setTableOffset($this->collectionOffsets[$fontId]); 69 | 70 | return $this->collection[$fontId] = $font; 71 | } 72 | 73 | function current() { 74 | return $this->getFont($this->position); 75 | } 76 | 77 | function key() { 78 | return $this->position; 79 | } 80 | 81 | function next() { 82 | return ++$this->position; 83 | } 84 | 85 | function rewind() { 86 | $this->position = 0; 87 | } 88 | 89 | function valid() { 90 | $this->parse(); 91 | 92 | return isset($this->collectionOffsets[$this->position]); 93 | } 94 | 95 | function count() { 96 | $this->parse(); 97 | 98 | return $this->numFonts; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/TrueType/Header.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\TrueType; 10 | 11 | /** 12 | * TrueType font file header. 13 | * 14 | * @package php-font-lib 15 | */ 16 | class Header extends \FontLib\Header { 17 | protected $def = array( 18 | "format" => self::uint32, 19 | "numTables" => self::uint16, 20 | "searchRange" => self::uint16, 21 | "entrySelector" => self::uint16, 22 | "rangeShift" => self::uint16, 23 | ); 24 | 25 | public function parse() { 26 | parent::parse(); 27 | 28 | $format = $this->data["format"]; 29 | $this->data["formatText"] = $this->convertUInt32ToStr($format); 30 | } 31 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/TrueType/TableDirectoryEntry.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\TrueType; 10 | 11 | use FontLib\Table\DirectoryEntry; 12 | 13 | /** 14 | * TrueType table directory entry. 15 | * 16 | * @package php-font-lib 17 | */ 18 | class TableDirectoryEntry extends DirectoryEntry { 19 | function __construct(File $font) { 20 | parent::__construct($font); 21 | } 22 | 23 | function parse() { 24 | parent::parse(); 25 | 26 | $font = $this->font; 27 | $this->checksum = $font->readUInt32(); 28 | $this->offset = $font->readUInt32(); 29 | $this->length = $font->readUInt32(); 30 | $this->entryLength += 12; 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/WOFF/File.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\WOFF; 10 | 11 | use FontLib\Table\DirectoryEntry; 12 | 13 | /** 14 | * WOFF font file. 15 | * 16 | * @package php-font-lib 17 | * 18 | * @property TableDirectoryEntry[] $directory 19 | */ 20 | class File extends \FontLib\TrueType\File { 21 | function parseHeader() { 22 | if (!empty($this->header)) { 23 | return; 24 | } 25 | 26 | $this->header = new Header($this); 27 | $this->header->parse(); 28 | } 29 | 30 | public function load($file) { 31 | parent::load($file); 32 | 33 | $this->parseTableEntries(); 34 | $dataOffset = $this->pos() + count($this->directory) * 20; 35 | 36 | $fw = $this->getTempFile(false); 37 | $fr = $this->f; 38 | 39 | $this->f = $fw; 40 | $offset = $this->header->encode(); 41 | 42 | foreach ($this->directory as $entry) { 43 | // Read ... 44 | $this->f = $fr; 45 | $this->seek($entry->offset); 46 | $data = $this->read($entry->length); 47 | 48 | if ($entry->length < $entry->origLength) { 49 | $data = gzuncompress($data); 50 | } 51 | 52 | // Prepare data ... 53 | $length = strlen($data); 54 | $entry->length = $entry->origLength = $length; 55 | $entry->offset = $dataOffset; 56 | 57 | // Write ... 58 | $this->f = $fw; 59 | 60 | // Woff Entry 61 | $this->seek($offset); 62 | $offset += $this->write($entry->tag, 4); // tag 63 | $offset += $this->writeUInt32($dataOffset); // offset 64 | $offset += $this->writeUInt32($length); // length 65 | $offset += $this->writeUInt32($length); // origLength 66 | $offset += $this->writeUInt32(DirectoryEntry::computeChecksum($data)); // checksum 67 | 68 | // Data 69 | $this->seek($dataOffset); 70 | $dataOffset += $this->write($data, $length); 71 | } 72 | 73 | $this->f = $fw; 74 | $this->seek(0); 75 | 76 | // Need to re-parse this, don't know why 77 | $this->header = null; 78 | $this->directory = array(); 79 | $this->parseTableEntries(); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/WOFF/Header.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\WOFF; 10 | 11 | /** 12 | * WOFF font file header. 13 | * 14 | * @package php-font-lib 15 | */ 16 | class Header extends \FontLib\TrueType\Header { 17 | protected $def = array( 18 | "format" => self::uint32, 19 | "flavor" => self::uint32, 20 | "length" => self::uint32, 21 | "numTables" => self::uint16, 22 | self::uint16, 23 | "totalSfntSize" => self::uint32, 24 | "majorVersion" => self::uint16, 25 | "minorVersion" => self::uint16, 26 | "metaOffset" => self::uint32, 27 | "metaLength" => self::uint32, 28 | "metaOrigLength" => self::uint32, 29 | "privOffset" => self::uint32, 30 | "privLength" => self::uint32, 31 | ); 32 | } -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/php-font-lib/classes/WOFF/TableDirectoryEntry.php: -------------------------------------------------------------------------------- 1 | 6 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 7 | */ 8 | 9 | namespace FontLib\WOFF; 10 | 11 | use FontLib\Table\DirectoryEntry; 12 | 13 | /** 14 | * WOFF font file table directory entry. 15 | * 16 | * @package php-font-lib 17 | */ 18 | class TableDirectoryEntry extends DirectoryEntry { 19 | public $origLength; 20 | 21 | function __construct(File $font) { 22 | parent::__construct($font); 23 | } 24 | 25 | function parse() { 26 | parent::parse(); 27 | 28 | $font = $this->font; 29 | $this->offset = $font->readUInt32(); 30 | $this->length = $font->readUInt32(); 31 | $this->origLength = $font->readUInt32(); 32 | $this->checksum = $font->readUInt32(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /application/third_party/dompdf/lib/res/broken_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/application/third_party/dompdf/lib/res/broken_image.png -------------------------------------------------------------------------------- /application/third_party/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/errors/cli/error_404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | An uncaught Exception was encountered 4 | 5 | Type: 6 | Message: 7 | Filename: getFile(), "\n"; ?> 8 | Line Number: getLine(); ?> 9 | 10 | 11 | 12 | Backtrace: 13 | getTrace() as $error): ?> 14 | 15 | File: 16 | Line: 17 | Function: 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /application/views/errors/cli/error_general.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | A PHP Error was encountered 4 | 5 | Severity: 6 | Message: 7 | Filename: 8 | Line Number: 9 | 10 | 11 | 12 | Backtrace: 13 | 14 | 15 | File: 16 | Line: 17 | Function: 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /application/views/errors/cli/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/errors/html/error_404.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 404 Page Not Found 8 | 57 | 58 | 59 |
60 |

61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /application/views/errors/html/error_db.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Database Error 8 | 57 | 58 | 59 |
60 |

61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /application/views/errors/html/error_exception.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 |

An uncaught Exception was encountered

8 | 9 |

Type:

10 |

Message:

11 |

Filename: getFile(); ?>

12 |

Line Number: getLine(); ?>

13 | 14 | 15 | 16 |

Backtrace:

17 | getTrace() as $error): ?> 18 | 19 | 20 | 21 |

22 | File:
23 | Line:
24 | Function: 25 |

26 | 27 | 28 | 29 | 30 | 31 | 32 |
-------------------------------------------------------------------------------- /application/views/errors/html/error_general.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Error 8 | 57 | 58 | 59 |
60 |

61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /application/views/errors/html/error_php.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 |

A PHP Error was encountered

8 | 9 |

Severity:

10 |

Message:

11 |

Filename:

12 |

Line Number:

13 | 14 | 15 | 16 |

Backtrace:

17 | 18 | 19 | 20 | 21 |

22 | File:
23 | Line:
24 | Function: 25 |

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
-------------------------------------------------------------------------------- /application/views/errors/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/errors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /application/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 - 2015, British Columbia Institute of Technology 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /sparks/php-activerecord/0.0.2/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.swp 3 | *.swo 4 | config/*.swp 5 | libraries/*.swp 6 | -------------------------------------------------------------------------------- /sparks/php-activerecord/0.0.2/config/autoload.php: -------------------------------------------------------------------------------- 1 | get_model_directory(); 34 | $root = realpath(isset($path) ? $path : '.'); 35 | 36 | if (($namespaces = ActiveRecord\get_namespaces($class_name))) 37 | { 38 | $class_name = array_pop($namespaces); 39 | $directories = array(); 40 | 41 | foreach ($namespaces as $directory) 42 | $directories[] = $directory; 43 | 44 | $root .= DS . implode($directories, DS); 45 | } 46 | 47 | $file_name = "{$class_name}.php"; 48 | $file = $root.DS.$file_name; 49 | 50 | if (file_exists($file)) { 51 | require $file; 52 | } else { 53 | $modules_path = APPPATH.'modules'; 54 | if (is_dir($modules_path)) { 55 | $modules = scandir(realpath($modules_path)); 56 | foreach ($modules as $module) { 57 | $full_path = $modules_path.DS.$module.DS.'models'.DS.$file_name; 58 | if ($module != '.' && $module != '..' && file_exists($full_path)) { 59 | require $full_path; 60 | } 61 | } 62 | } 63 | } 64 | } 65 | ?> 66 | -------------------------------------------------------------------------------- /sparks/php-activerecord/0.0.2/vendor/php-activerecord/CHANGELOG: -------------------------------------------------------------------------------- 1 | Version 1.0 - June 27, 2010 2 | 3 | - d2bed65 fixed an error with eager loading when no records exist 4 | - c225942 fixed set methods on DateTime objects to properly flag attributes as dirty 5 | - 46a1219 fixed a memory leak when using validations 6 | - c225942 fixed problem with some model functionality not working correctly after being deserialized 7 | - 3e26749 fixed validates_numericality_of to not ignore other options when only_integer is present and matches 8 | - 53ad5ec fixed ambiguous id error when finding by pk with a join option 9 | - 26e40f4 fixed conditions to accept DateTime values 10 | - 41e52fe changed serialization to serialize datetime fields as strings instead of the actual DateTime objects 11 | - dbee94b Model::transaction() now returns true if commit was successful otherwise false 12 | 13 | Versio 1.0 RC1 - May 7, 2010 14 | 15 | - support for Oracle 16 | - support for PostgreSQL 17 | - added delegators 18 | - added setters 19 | - added getters 20 | - added HAVING as a finder option 21 | - added ability to find using a hash 22 | - added find_or_create_by 23 | - added validates_uniqueness_of 24 | - added dynamic count_by 25 | - added eager loading 26 | -------------------------------------------------------------------------------- /sparks/php-activerecord/0.0.2/vendor/php-activerecord/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 2 | 3 | AUTHORS: 4 | Kien La 5 | Jacques Fuentes 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. -------------------------------------------------------------------------------- /sparks/php-activerecord/0.0.2/vendor/php-activerecord/lib/Cache.php: -------------------------------------------------------------------------------- 1 | set_cache('memcache://localhost:11211',array('namespace' => 'my_cool_app', 29 | * 'expire' => 120 30 | * )); 31 | * 32 | * In the example above all the keys expire after 120 seconds, and the 33 | * all get a postfix 'my_cool_app'. 34 | * 35 | * (Note: expiring needs to be implemented in your cache store.) 36 | * 37 | * @param string $url URL to your cache server 38 | * @param array $options Specify additional options 39 | */ 40 | public static function initialize($url, $options=array()) 41 | { 42 | if ($url) 43 | { 44 | $url = parse_url($url); 45 | $file = ucwords(Inflector::instance()->camelize($url['scheme'])); 46 | $class = "ActiveRecord\\$file"; 47 | require_once __DIR__ . "/cache/$file.php"; 48 | static::$adapter = new $class($url); 49 | } 50 | else 51 | static::$adapter = null; 52 | 53 | static::$options = array_merge(array('expire' => 30, 'namespace' => ''),$options); 54 | } 55 | 56 | public static function flush() 57 | { 58 | if (static::$adapter) 59 | static::$adapter->flush(); 60 | } 61 | 62 | public static function get($key, $closure) 63 | { 64 | $key = static::get_namespace() . $key; 65 | 66 | if (!static::$adapter) 67 | return $closure(); 68 | 69 | if (!($value = static::$adapter->read($key))) 70 | static::$adapter->write($key,($value = $closure()),static::$options['expire']); 71 | 72 | return $value; 73 | } 74 | 75 | private static function get_namespace() 76 | { 77 | return (isset(static::$options['namespace']) && strlen(static::$options['namespace']) > 0) ? (static::$options['namespace'] . "::") : ""; 78 | } 79 | } 80 | ?> 81 | -------------------------------------------------------------------------------- /sparks/php-activerecord/0.0.2/vendor/php-activerecord/lib/ConnectionManager.php: -------------------------------------------------------------------------------- 1 | get_default_connection(); 31 | 32 | if (!isset(self::$connections[$name]) || !self::$connections[$name]->connection) 33 | self::$connections[$name] = Connection::instance($config->get_connection($name)); 34 | 35 | return self::$connections[$name]; 36 | } 37 | 38 | /** 39 | * Drops the connection from the connection manager. Does not actually close it since there 40 | * is no close method in PDO. 41 | * 42 | * @param string $name Name of the connection to forget about 43 | */ 44 | public static function drop_connection($name=null) 45 | { 46 | if (isset(self::$connections[$name])) 47 | unset(self::$connections[$name]); 48 | } 49 | }; 50 | ?> 51 | -------------------------------------------------------------------------------- /sparks/php-activerecord/0.0.2/vendor/php-activerecord/lib/Reflections.php: -------------------------------------------------------------------------------- 1 | add('class')->get() 27 | */ 28 | public function add($class=null) 29 | { 30 | $class = $this->get_class($class); 31 | 32 | if (!isset($this->reflections[$class])) 33 | $this->reflections[$class] = new ReflectionClass($class); 34 | 35 | return $this; 36 | } 37 | 38 | /** 39 | * Destroys the cached ReflectionClass. 40 | * 41 | * Put this here mainly for testing purposes. 42 | * 43 | * @param string $class Name of a class. 44 | * @return void 45 | */ 46 | public function destroy($class) 47 | { 48 | if (isset($this->reflections[$class])) 49 | $this->reflections[$class] = null; 50 | } 51 | 52 | /** 53 | * Get a cached ReflectionClass. 54 | * 55 | * @param string $class Optional name of a class 56 | * @return mixed null or a ReflectionClass instance 57 | * @throws ActiveRecordException if class was not found 58 | */ 59 | public function get($class=null) 60 | { 61 | $class = $this->get_class($class); 62 | 63 | if (isset($this->reflections[$class])) 64 | return $this->reflections[$class]; 65 | 66 | throw new ActiveRecordException("Class not found: $class"); 67 | } 68 | 69 | /** 70 | * Retrieve a class name to be reflected. 71 | * 72 | * @param mixed $mixed An object or name of a class 73 | * @return string 74 | */ 75 | private function get_class($mixed=null) 76 | { 77 | if (is_object($mixed)) 78 | return get_class($mixed); 79 | 80 | if (!is_null($mixed)) 81 | return $mixed; 82 | 83 | return $this->get_called_class(); 84 | } 85 | } 86 | ?> -------------------------------------------------------------------------------- /sparks/php-activerecord/0.0.2/vendor/php-activerecord/lib/Singleton.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sparks/php-activerecord/0.0.2/vendor/php-activerecord/lib/cache/Memcache.php: -------------------------------------------------------------------------------- 1 | 16 | *
  • host: host for the memcache server
  • 17 | *
  • port: port for the memcache server
  • 18 | * 19 | * @param array $options 20 | */ 21 | public function __construct($options) 22 | { 23 | $this->memcache = new \Memcache(); 24 | $options['port'] = isset($options['port']) ? $options['port'] : self::DEFAULT_PORT; 25 | 26 | if (!$this->memcache->connect($options['host'],$options['port'])) 27 | throw new CacheException("Could not connect to $options[host]:$options[port]"); 28 | } 29 | 30 | public function flush() 31 | { 32 | $this->memcache->flush(); 33 | } 34 | 35 | public function read($key) 36 | { 37 | return $this->memcache->get($key); 38 | } 39 | 40 | public function write($key, $value, $expire) 41 | { 42 | $this->memcache->set($key,$value,null,$expire); 43 | } 44 | } 45 | ?> 46 | -------------------------------------------------------------------------------- /system/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Deny from all 6 | -------------------------------------------------------------------------------- /system/core/Model.php: -------------------------------------------------------------------------------- 1 | $key; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /system/core/compat/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/cubrid/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/ibase/ibase_utility.php: -------------------------------------------------------------------------------- 1 | db->hostname, $this->db->username, $this->db->password)) 58 | { 59 | $res = ibase_backup($service, $this->db->database, $filename.'.fbk'); 60 | 61 | // Close the service connection 62 | ibase_service_detach($service); 63 | return $res; 64 | } 65 | 66 | return FALSE; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /system/database/drivers/ibase/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/mssql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/mssql/mssql_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsupported_feature'); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /system/database/drivers/mysql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/mysqli/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/oci8/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/oci8/oci8_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsupported_feature'); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /system/database/drivers/odbc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/odbc/odbc_forge.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsupported_feature'); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /system/database/drivers/pdo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/pdo/pdo_forge.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsupported_feature'); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /system/database/drivers/pdo/subdrivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/postgre/postgre_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsupported_feature'); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /system/database/drivers/sqlite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/sqlite/sqlite_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsupported_feature'); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /system/database/drivers/sqlite3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/sqlite3/sqlite3_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsupported_feature'); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /system/database/drivers/sqlsrv/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/database/drivers/sqlsrv/sqlsrv_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsupported_feature'); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /system/database/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/fonts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/fonts/texb.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/system/fonts/texb.ttf -------------------------------------------------------------------------------- /system/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/helpers/language_helper.php: -------------------------------------------------------------------------------- 1 | lang->line($line); 67 | 68 | if ($for !== '') 69 | { 70 | $line = ''; 71 | } 72 | 73 | return $line; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /system/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/language/english/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/language/english/migration_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/libraries/Cache/drivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/libraries/Cache/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/libraries/Javascript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/libraries/Session/SessionHandlerInterface.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/libraries/Session/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

    Directory access is forbidden.

    9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tools/README.md: -------------------------------------------------------------------------------- 1 | # CodeIgniter Spark 2 | 3 | Spark is a way to pull down packages automatically 4 | 5 | $ tools/spark install -v1.2 gravatar_helper 6 | 7 | And then you can load the package like so: 8 | 9 | $this->load->spark('gravatar_helper/1.2'); 10 | echo Gravatar_helper::from_email('john.crepezzi@gmail.com'); 11 | 12 | --- 13 | 14 | ## Adding a package 15 | 16 | $ tools/spark install -v1.2 gravatar 17 | $ tools/spark install gravatar # most recent version 18 | 19 | ## Removing a package 20 | 21 | $ tools/spark remove -v1.2 gravatar # remove a specific version 22 | $ tools/spark remove gravatar -f # remove all 23 | 24 | ## Reinstalling a package 25 | 26 | $ tools/spark reinstall -v1.2 gravatar # reinstall a specific version 27 | $ tools/spark reinstall gravatar -f # remove all versions and install latest 28 | 29 | ## Search for a package 30 | 31 | $ tools/spark search gravatar 32 | 33 | ## List installed packages 34 | 35 | $ tools/spark list 36 | 37 | ## Get Help 38 | 39 | $ tools/spark help 40 | 41 | --- 42 | 43 | ## Install 44 | 45 | Go to your favorite CI project, and run (must have CURL installed): 46 | 47 | $ php -r "$(curl -fsSL http://www.getsparks.org/static/install.php)" 48 | -------------------------------------------------------------------------------- /tools/lib/spark/sources: -------------------------------------------------------------------------------- 1 | # the main repository 2 | getsparks.org 3 | 4 | # list other repositories here 5 | -------------------------------------------------------------------------------- /tools/lib/spark/spark_exception.php: -------------------------------------------------------------------------------- 1 | tag = $this->tag; 13 | } 14 | 15 | static function get_spark($data) 16 | { 17 | if (self::git_installed()) 18 | { 19 | return new Git_spark($data); 20 | } 21 | else 22 | { 23 | Spark_utils::warning('Git not found - reverting to archived copy'); 24 | return new Zip_spark($data); 25 | } 26 | } 27 | 28 | private static function git_installed() 29 | { 30 | return !!`git`; 31 | } 32 | 33 | function location_detail() 34 | { 35 | return "Git repository at $this->base_location"; 36 | } 37 | 38 | function retrieve() 39 | { 40 | // check out the right tag 41 | `git clone --recursive $this->base_location $this->temp_path`; 42 | `cd $this->temp_path; git checkout $this->tag -b $this->temp_token`; 43 | // remove the git directory 44 | Spark_utils::remove_full_directory("$this->temp_path/.git"); 45 | 46 | if (!file_exists($this->temp_path)) 47 | { 48 | throw new Spark_exception('Failed to retrieve the spark ;('); 49 | } 50 | return true; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /tools/lib/spark/spark_types/hg_spark.php: -------------------------------------------------------------------------------- 1 | tag = $this->tag; 9 | } 10 | 11 | static function get_spark($data) 12 | { 13 | if (self::hg_installed()) 14 | { 15 | return new Mercurial_spark($data); 16 | } 17 | else 18 | { 19 | Spark_utils::warning('Mercurial not found - reverting to archived copy'); 20 | return new Zip_spark($data); 21 | } 22 | } 23 | 24 | private static function hg_installed() 25 | { 26 | return !!`hg`; 27 | } 28 | 29 | function location_detail() 30 | { 31 | return "Mercurial repository at $this->base_location"; 32 | } 33 | 34 | function retrieve() 35 | { 36 | `hg clone -r$this->tag $this->base_location $this->temp_path`; 37 | // remove the mercurial directory 38 | Spark_utils::remove_full_directory("$this->temp_path/.hg"); 39 | 40 | if (!file_exists($this->temp_path)) 41 | { 42 | throw new Spark_exception('Failed to retrieve the spark ;('); 43 | } 44 | return true; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /tools/lib/spark/spark_types/zip_spark.php: -------------------------------------------------------------------------------- 1 | temp_file = $this->temp_path . '.zip'; 9 | $this->archive_url = property_exists($this->data, 'archive_url') ? $this->data->archive_url : null; 10 | } 11 | 12 | function location_detail() 13 | { 14 | return "ZIP archive at $this->archive_url"; 15 | } 16 | 17 | private static function unzip_installed() 18 | { 19 | return !!`unzip`; 20 | } 21 | 22 | function retrieve() 23 | { 24 | file_put_contents($this->temp_file, file_get_contents($this->archive_url)); 25 | // Try a few ways to unzip 26 | if (class_exists('ZipArchive')) 27 | { 28 | $zip = new ZipArchive; 29 | $zip->open($this->temp_file); 30 | $zip->extractTo($this->temp_path); 31 | $zip->close(); 32 | } 33 | else 34 | { 35 | if (!self::unzip_installed()) 36 | { 37 | throw new Spark_exception('You have to install PECL ZipArchive or `unzip` to install this spark.'); 38 | } 39 | `unzip $this->temp_file -d $this->temp_path`; 40 | } 41 | 42 | if (!file_exists($this->temp_path)) 43 | { 44 | throw new Spark_exception('Failed to retrieve the spark ;('); 45 | } 46 | return true; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /tools/spark: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 1 ? $argv[1] : null; 30 | $args = $argc > 2 ? array_slice($argv, 2) : array(); 31 | 32 | $cli->execute($cmd, $args); 33 | -------------------------------------------------------------------------------- /tools/test/install_test.php: -------------------------------------------------------------------------------- 1 | capture_buffer_lines(function($cli) { 8 | $cli->execute('install', array('-v1.0', 'example-spark')); 9 | }); 10 | $success = (bool) (strpos(end($clines), chr(27) . '[1;36m[ SPARK ]' . 11 | chr(27) . '[0m Spark installed') === 0); 12 | Spark_utils::remove_full_directory(SPARK_PATH . '/example-spark'); 13 | $this->assertEquals(true, $success); 14 | } 15 | 16 | function test_install_without_version() 17 | { 18 | $clines = $this->capture_buffer_lines(function($cli) { 19 | $cli->execute('install', array('example-spark')); 20 | }); 21 | $success = (bool) (strpos(end($clines), chr(27) . '[1;36m[ SPARK ]' . 22 | chr(27) . '[0m Spark installed') === 0); 23 | Spark_utils::remove_full_directory(SPARK_PATH . '/example-spark'); 24 | $this->assertEquals(true, $success); 25 | } 26 | 27 | function test_install_with_invalid_spark() 28 | { 29 | $clines = $this->capture_buffer_lines(function($cli) { 30 | $cli->execute('install', array('jjks7878erHjhsjdkksj')); 31 | }); 32 | $success = (bool) (strpos(end($clines), chr(27) . '[1;31m[ ERROR ]' . 33 | chr(27) . '[0m Unable to find spark') === 0); 34 | Spark_utils::remove_full_directory(SPARK_PATH . '/example-spark'); 35 | $this->assertEquals(true, $success); 36 | } 37 | 38 | function test_install_with_invalid_spark_version() 39 | { 40 | $clines = $this->capture_buffer_lines(function($cli) { 41 | $cli->execute('install', array('v9.4', 'example-spark')); 42 | }); 43 | $success = (bool) (strpos(reset($clines), chr(27) . '[1;31m[ ERROR ]' . 44 | chr(27) . '[0m Uh-oh!') === 0); 45 | Spark_utils::remove_full_directory(SPARK_PATH . '/example-spark'); 46 | $this->assertEquals(true, $success); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /tools/test/lib/bootstrap.php: -------------------------------------------------------------------------------- 1 | source_names[] = 'getsparks.org'; 12 | $this->sources = array_map(function($n) { 13 | return new Spark_source($n); 14 | }, $this->source_names); 15 | $this->cli = new Spark_CLI($this->sources); 16 | } 17 | 18 | function tearDown() 19 | { 20 | if (is_dir(SPARK_PATH . '/example-spark')) 21 | { 22 | Spark_utils::remove_full_directory(SPARK_PATH . '/example-spark'); 23 | } 24 | } 25 | 26 | protected function capture_buffer_lines($func) { 27 | ob_start(); 28 | $func($this->cli); 29 | $t = ob_get_contents(); 30 | ob_end_clean(); 31 | if ($t == '') return array(); // empty 32 | return explode("\n", substr($t, 0, count($t) - 2)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tools/test/lib/test-sparks/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zentraedi/codeigniter3-boilerplate/90797473d466857f099c22d5e75186b5401aac2f/tools/test/lib/test-sparks/.gitkeep -------------------------------------------------------------------------------- /tools/test/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ./ 7 | 8 | 9 | -------------------------------------------------------------------------------- /tools/test/remove_test.php: -------------------------------------------------------------------------------- 1 | capture_buffer_lines(function($cli) { 9 | $cli->execute('install', array('-v1.0', 'example-spark')); // Spark needs installed first 10 | $cli->execute('remove', array('-v1.0', 'example-spark')); 11 | }); 12 | $success = (bool) (strpos(end($clines), chr(27) . '[1;36m[ SPARK ]' . chr(27) . '[0m Spark removed') === 0 && ! is_dir(SPARK_PATH.'/example-spark')); 13 | $this->assertEquals(true, $success); 14 | Spark_utils::remove_full_directory(SPARK_PATH . '/example-spark'); 15 | } 16 | 17 | function test_remove_without_flags() 18 | { 19 | $clines = $this->capture_buffer_lines(function($cli) { 20 | $cli->execute('install', array('-v1.0', 'example-spark')); // Spark needs installed first 21 | $cli->execute('remove', array('example-spark')); 22 | }); 23 | $success = (bool) (strpos(end($clines), chr(27) . '[1;31m[ ERROR ]' . chr(27) . '[0m Please specify') === 0 && is_dir(SPARK_PATH.'/example-spark')); 24 | $this->assertEquals(true, $success); 25 | Spark_utils::remove_full_directory(SPARK_PATH . '/example-spark'); 26 | } 27 | 28 | function test_remove_with_f_flag() 29 | { 30 | $clines = $this->capture_buffer_lines(function($cli) { 31 | $cli->execute('install', array('-v1.0', 'example-spark')); // Spark needs installed first 32 | $cli->execute('remove', array('-f', 'example-spark')); 33 | }); 34 | $success = (bool) (strpos(end($clines), chr(27) . '[1;36m[ SPARK ]' . chr(27) . '[0m Spark removed') === 0 && ! is_dir(SPARK_PATH.'/example-spark')); 35 | $this->assertEquals(true, $success); 36 | Spark_utils::remove_full_directory(SPARK_PATH . '/example-spark'); 37 | } 38 | 39 | function test_remove_with_invalid_version() 40 | { 41 | $clines = $this->capture_buffer_lines(function($cli) { 42 | $cli->execute('install', array('-v1.0', 'example-spark')); // Spark needs installed first 43 | $cli->execute('remove', array('-v9.4', 'example-spark')); 44 | }); 45 | $success = (bool) (strpos(end($clines), chr(27) . '[1;36m[ SPARK ]' . chr(27) . '[0m Looks like that spark isn\'t installed') === 0 && is_dir(SPARK_PATH.'/example-spark')); 46 | $this->assertEquals(true, $success); 47 | Spark_utils::remove_full_directory(SPARK_PATH . '/example-spark'); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /tools/test/search_test.php: -------------------------------------------------------------------------------- 1 | capture_buffer_lines(function($cli) { 8 | $cli->execute('search', array('markdown')); 9 | }); 10 | // Less than ideal, I know 11 | $this->assertEquals(array("\033[33mmarkdown\033[0m - A markdown helper for easy parsing of markdown"), $clines); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tools/test/version_test.php: -------------------------------------------------------------------------------- 1 | capture_buffer_lines(function($cli) { 8 | $cli->execute('version'); 9 | }); 10 | $this->assertEquals(array(SPARK_VERSION), $clines); 11 | } 12 | 13 | function test_sources() 14 | { 15 | $clines = $this->capture_buffer_lines(function($cli) { 16 | $cli->execute('sources'); 17 | }); 18 | $this->assertEquals($this->source_names, $clines); 19 | } 20 | 21 | function test_bad_command() 22 | { 23 | $clines = $this->capture_buffer_lines(function($cli) { 24 | $cli->execute('fake'); 25 | }); 26 | $this->assertEquals(array(chr(27) . '[1;31m[ ERROR ]' . chr(27) . '[0m Uh-oh!', chr(27) . '[1;31m[ ERROR ]' . chr(27) . '[0m Unknown action: fake'), $clines); 27 | } 28 | 29 | function test_search_empty() 30 | { 31 | $clines = $this->capture_buffer_lines(function($cli) { 32 | $cli->execute('search', array('nothing_found_here')); 33 | }); 34 | $this->assertEquals(array(), $clines); 35 | } 36 | 37 | } 38 | --------------------------------------------------------------------------------