├── .editorconfig ├── .gitattributes ├── .gitignore ├── .travis.yml ├── DEVELOPMENT.md ├── LICENSE ├── README.md ├── appveyor.yml ├── codeception.yml ├── composer.json ├── config.json ├── examples ├── dev-tools │ ├── .gitignore │ ├── LICENSE │ ├── app │ │ └── Command │ │ │ └── Test.php │ └── composer.json ├── micro │ ├── LICENSE │ └── public │ │ └── index.php ├── multi-module │ ├── .gitignore │ ├── LICENSE │ ├── app │ │ └── modules │ │ │ ├── api │ │ │ └── controllers │ │ │ │ ├── IndexController.php │ │ │ │ └── UserController.php │ │ │ └── frontend │ │ │ └── controllers │ │ │ └── IndexController.php │ ├── composer.json │ └── public │ │ └── index.php ├── mvc-app │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── app │ │ └── modules │ │ │ └── common │ │ │ ├── controllers │ │ │ └── IndexController.php │ │ │ └── resources │ │ │ └── views │ │ │ └── index │ │ │ └── index.phtml │ ├── composer.json │ └── public │ │ └── index.php ├── rest-app │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── app │ │ ├── Application.php │ │ └── modules │ │ │ └── api │ │ │ └── controllers │ │ │ ├── IndexController.php │ │ │ ├── ProductController.php │ │ │ └── UserController.php │ ├── composer.json │ └── public │ │ ├── dev.php │ │ └── index.php └── simple │ └── index.php ├── ext ├── CMakeLists.txt ├── clean ├── config.m4 ├── config.w32 ├── ext.h ├── ext_config.h ├── install ├── kernel │ ├── array.c │ ├── array.h │ ├── assert.c │ ├── assert.h │ ├── backtrace.c │ ├── backtrace.h │ ├── concat.c │ ├── concat.h │ ├── debug.c │ ├── debug.h │ ├── exception.c │ ├── exception.h │ ├── exit.c │ ├── exit.h │ ├── extended │ │ ├── array.c │ │ ├── array.h │ │ ├── fcall.c │ │ └── fcall.h │ ├── fcall.c │ ├── fcall.h │ ├── fcall_internal.h │ ├── file.c │ ├── file.h │ ├── filter.c │ ├── filter.h │ ├── globals.h │ ├── hash.c │ ├── hash.h │ ├── iterator.c │ ├── iterator.h │ ├── main.c │ ├── main.h │ ├── math.c │ ├── math.h │ ├── memory.c │ ├── memory.h │ ├── object.c │ ├── object.h │ ├── operators.c │ ├── operators.h │ ├── output.c │ ├── output.h │ ├── persistent.c │ ├── persistent.h │ ├── require.c │ ├── require.h │ ├── session.c │ ├── session.h │ ├── string.c │ ├── string.h │ ├── time.c │ ├── time.h │ ├── variables.c │ └── variables.h ├── owl.c ├── owl.h ├── owl │ ├── annotations │ │ ├── annot.h │ │ ├── annotation.zep.c │ │ ├── annotation.zep.h │ │ ├── base.c │ │ ├── classannotationsresult.zep.c │ │ ├── classannotationsresult.zep.h │ │ ├── exception.zep.c │ │ ├── exception.zep.h │ │ ├── lemon.c │ │ ├── lempar.c │ │ ├── parser.c │ │ ├── parser.h │ │ ├── parser.lemon │ │ ├── reader.zep.c │ │ ├── reader.zep.h │ │ ├── scanner.c │ │ ├── scanner.h │ │ └── scanner.re │ ├── application.zep.c │ ├── application.zep.h │ ├── applicationinterface.zep.c │ ├── applicationinterface.zep.h │ ├── bridge │ │ └── lynx │ │ │ └── rest │ │ │ ├── entitycontroller.zep.c │ │ │ └── entitycontroller.zep.h │ ├── cache │ │ ├── driver.zep.c │ │ ├── driver.zep.h │ │ └── driver │ │ │ ├── cachedriver.zep.c │ │ │ ├── cachedriver.zep.h │ │ │ ├── memcache.zep.c │ │ │ ├── memcache.zep.h │ │ │ ├── memcached.zep.c │ │ │ ├── memcached.zep.h │ │ │ ├── nativearray.zep.c │ │ │ ├── nativearray.zep.h │ │ │ ├── redis.zep.c │ │ │ └── redis.zep.h │ ├── console │ │ ├── application.zep.c │ │ ├── application.zep.h │ │ ├── commandinterface.zep.c │ │ └── commandinterface.zep.h │ ├── dbal │ │ ├── connection.zep.c │ │ ├── connection.zep.h │ │ ├── driver │ │ │ ├── abstractpdo.zep.c │ │ │ ├── abstractpdo.zep.h │ │ │ ├── abstractpdoadapter.zep.c │ │ │ ├── abstractpdoadapter.zep.h │ │ │ ├── driverinterface.zep.c │ │ │ ├── driverinterface.zep.h │ │ │ ├── mysql.zep.c │ │ │ ├── mysql.zep.h │ │ │ ├── pdo.zep.c │ │ │ ├── pdo.zep.h │ │ │ ├── pgsql.zep.c │ │ │ └── pgsql.zep.h │ │ ├── exception.zep.c │ │ ├── exception.zep.h │ │ └── platform │ │ │ ├── mysql.zep.c │ │ │ ├── mysql.zep.h │ │ │ ├── pgsql.zep.c │ │ │ ├── pgsql.zep.h │ │ │ ├── platforminterface.zep.c │ │ │ └── platforminterface.zep.h │ ├── debug │ │ ├── memoryprofiler.zep.c │ │ ├── memoryprofiler.zep.h │ │ ├── profiler.zep.c │ │ └── profiler.zep.h │ ├── di │ │ ├── container.zep.c │ │ ├── container.zep.h │ │ ├── containerinterface.zep.c │ │ ├── containerinterface.zep.h │ │ ├── servicedefinition.zep.c │ │ ├── servicedefinition.zep.h │ │ ├── servicedefinitioninterface.zep.c │ │ └── servicedefinitioninterface.zep.h │ ├── dispatcherinterface.zep.c │ ├── dispatcherinterface.zep.h │ ├── event │ │ ├── event.zep.c │ │ ├── event.zep.h │ │ ├── manager.zep.c │ │ └── manager.zep.h │ ├── exception.zep.c │ ├── exception.zep.h │ ├── filter │ │ ├── abstractfilter.zep.c │ │ ├── abstractfilter.zep.h │ │ ├── email.zep.c │ │ ├── email.zep.h │ │ ├── filterinterface.zep.c │ │ ├── filterinterface.zep.h │ │ ├── striptags.zep.c │ │ ├── striptags.zep.h │ │ ├── trim.zep.c │ │ ├── trim.zep.h │ │ ├── url.zep.c │ │ └── url.zep.h │ ├── http │ │ ├── headersbag.zep.c │ │ ├── headersbag.zep.h │ │ ├── request.zep.c │ │ ├── request.zep.h │ │ ├── requestinterface.zep.c │ │ ├── requestinterface.zep.h │ │ ├── response.zep.c │ │ ├── response.zep.h │ │ ├── response │ │ │ ├── json.zep.c │ │ │ └── json.zep.h │ │ ├── responseinterface.zep.c │ │ └── responseinterface.zep.h │ ├── log │ │ ├── abstractformatter.zep.c │ │ ├── abstractformatter.zep.h │ │ ├── abstractlogger.zep.c │ │ ├── abstractlogger.zep.h │ │ ├── abstractwriter.zep.c │ │ ├── abstractwriter.zep.h │ │ ├── exception │ │ │ ├── invalidformatterexception.zep.c │ │ │ ├── invalidformatterexception.zep.h │ │ │ ├── invalidwriterexception.zep.c │ │ │ └── invalidwriterexception.zep.h │ │ ├── formatter │ │ │ ├── json.zep.c │ │ │ ├── json.zep.h │ │ │ ├── line.zep.c │ │ │ └── line.zep.h │ │ ├── formatterinterface.zep.c │ │ ├── formatterinterface.zep.h │ │ ├── logger.zep.c │ │ ├── logger.zep.h │ │ ├── loggerinterface.zep.c │ │ ├── loggerinterface.zep.h │ │ ├── record.zep.c │ │ ├── record.zep.h │ │ ├── writer │ │ │ ├── devnull.zep.c │ │ │ ├── devnull.zep.h │ │ │ ├── echobrowser.zep.c │ │ │ ├── echobrowser.zep.h │ │ │ ├── file.zep.c │ │ │ └── file.zep.h │ │ ├── writerinterface.zep.c │ │ └── writerinterface.zep.h │ ├── module │ │ ├── manager.zep.c │ │ └── manager.zep.h │ ├── mvc │ │ ├── controller.zep.c │ │ ├── controller.zep.h │ │ ├── controllerinterface.zep.c │ │ ├── controllerinterface.zep.h │ │ ├── view.zep.c │ │ ├── view.zep.h │ │ ├── view │ │ │ └── engine │ │ │ │ ├── php.zep.c │ │ │ │ └── php.zep.h │ │ ├── viewinterface.zep.c │ │ └── viewinterface.zep.h │ ├── router │ │ ├── http │ │ │ ├── dynamicroute.zep.c │ │ │ ├── dynamicroute.zep.h │ │ │ ├── staticroute.zep.c │ │ │ └── staticroute.zep.h │ │ ├── route.zep.c │ │ ├── route.zep.h │ │ ├── router.zep.c │ │ ├── router.zep.h │ │ ├── routerinterface.zep.c │ │ └── routerinterface.zep.h │ ├── session │ │ ├── managerinterface.zep.c │ │ └── managerinterface.zep.h │ └── std │ │ ├── arraybag.zep.c │ │ ├── arraybag.zep.h │ │ └── collection │ │ ├── abstractcollection.zep.c │ │ ├── abstractcollection.zep.h │ │ ├── arraycollection.zep.c │ │ └── arraycollection.zep.h ├── pgo-install ├── pgo-use-install ├── php_ext.h └── php_owl.h ├── ide └── Owl │ ├── Application.zep.php │ ├── ApplicationInterface.zep.php │ ├── DispatcherInterface.zep.php │ ├── Exception.zep.php │ ├── annotations │ ├── Annotation.zep.php │ ├── ClassAnnotationsResult.zep.php │ ├── Exception.zep.php │ └── Reader.zep.php │ ├── bridge │ └── lynx │ │ └── rest │ │ └── EntityController.zep.php │ ├── cache │ ├── Driver.zep.php │ └── driver │ │ ├── CacheDriver.zep.php │ │ ├── Memcache.zep.php │ │ ├── Memcached.zep.php │ │ ├── NativeArray.zep.php │ │ └── Redis.zep.php │ ├── console │ ├── Application.zep.php │ └── CommandInterface.zep.php │ ├── dbal │ ├── Connection.zep.php │ ├── Exception.zep.php │ ├── driver │ │ ├── AbstractPdo.zep.php │ │ ├── DriverInterface.zep.php │ │ ├── MySQL.zep.php │ │ ├── Pdo.zep.php │ │ └── PgSQL.zep.php │ └── platform │ │ ├── MySQL.zep.php │ │ ├── PgSQL.zep.php │ │ └── PlatformInterface.zep.php │ ├── debug │ ├── MemoryProfiler.zep.php │ └── Profiler.zep.php │ ├── di │ ├── Container.zep.php │ ├── ContainerInterface.zep.php │ ├── ServiceDefinition.zep.php │ └── ServiceDefinitionInterface.zep.php │ ├── event │ ├── Event.zep.php │ └── Manager.zep.php │ ├── filter │ ├── AbstractFilter.zep.php │ ├── Email.zep.php │ ├── FilterInterface.zep.php │ ├── StripTags.zep.php │ ├── Trim.zep.php │ └── Url.zep.php │ ├── http │ ├── HeadersBag.zep.php │ ├── Request.zep.php │ ├── RequestInterface.zep.php │ ├── Response.zep.php │ ├── ResponseInterface.zep.php │ └── response │ │ └── Json.zep.php │ ├── log │ ├── AbstractLogger.zep.php │ ├── AbstractWriter.zep.php │ ├── FormatterInterface.zep.php │ ├── Logger.zep.php │ ├── LoggerInterface.zep.php │ ├── Record.zep.php │ ├── WriterInterface.zep.php │ ├── exception │ │ ├── InvalidFormatterException.zep.php │ │ └── InvalidWriterException.zep.php │ ├── formatter │ │ ├── Json.zep.php │ │ └── Line.zep.php │ └── writer │ │ ├── DevNull.zep.php │ │ ├── EchoBrowser.zep.php │ │ └── File.zep.php │ ├── module │ └── Manager.zep.php │ ├── mvc │ ├── Controller.zep.php │ ├── ControllerInterface.zep.php │ ├── View.zep.php │ ├── ViewInterface.zep.php │ └── view │ │ └── engine │ │ └── Php.zep.php │ ├── router │ ├── Route.zep.php │ ├── Router.zep.php │ ├── RouterInterface.zep.php │ └── http │ │ ├── DynamicRoute.zep.php │ │ └── StaticRoute.zep.php │ ├── session │ └── ManagerInterface.zep.php │ └── std │ ├── ArrayBag.zep.php │ └── collection │ ├── AbstractCollection.zep.php │ └── ArrayCollection.zep.php ├── optimizers └── ParseAnnotationsOptimizer.php ├── owl ├── Annotations │ ├── Annotation.zep │ ├── ClassAnnotationsResult.zep │ ├── Exception.zep │ └── Reader.zep ├── Application.zep ├── ApplicationInterface.zep ├── Bridge │ └── Lynx │ │ └── Rest │ │ └── EntityController.zep ├── Cache │ ├── Driver.zep │ └── Driver │ │ ├── CacheDriver.zep │ │ ├── Memcache.zep │ │ ├── Memcached.zep │ │ ├── NativeArray.zep │ │ └── Redis.zep ├── Console │ ├── Application.zep │ └── CommandInterface.zep ├── DBAL │ ├── Connection.zep │ ├── Driver │ │ ├── AbstractPdo.zep │ │ ├── DriverInterface.zep │ │ ├── MySql.zep │ │ ├── Pdo.zep │ │ └── PgSql.zep │ ├── Exception.zep │ └── Platform │ │ ├── MySQL.zep │ │ ├── PgSQL.zep │ │ └── PlatformInterface.zep ├── Debug │ ├── MemoryProfiler.zep │ └── Profiler.zep ├── Di │ ├── Container.zep │ ├── ContainerInterface.zep │ ├── ServiceDefinition.zep │ └── ServiceDefinitionInterface.zep ├── DispatcherInterface.zep ├── Event │ ├── Event.zep │ └── Manager.zep ├── Exception.zep ├── Filter │ ├── AbstractFilter.zep │ ├── Email.zep │ ├── FilterInterface.zep │ ├── StripTags.zep │ ├── Trim.zep │ └── Url.zep ├── Http │ ├── HeadersBag.zep │ ├── Request.zep │ ├── RequestInterface.zep │ ├── Response.zep │ ├── Response │ │ └── Json.zep │ └── ResponseInterface.zep ├── Log │ ├── AbstractLogger.zep │ ├── AbstractWriter.zep │ ├── Exception │ │ ├── InvalidFormatterException.zep │ │ └── InvalidWriterException.zep │ ├── Formatter │ │ ├── Json.zep │ │ └── Line.zep │ ├── FormatterInterface.zep │ ├── Logger.zep │ ├── LoggerInterface.zep │ ├── Record.zep │ ├── Writer │ │ ├── DevNull.zep │ │ ├── EchoBrowser.zep │ │ └── File.zep │ └── WriterInterface.zep ├── Module │ └── Manager.zep ├── Mvc │ ├── Controller.zep │ ├── ControllerInterface.zep │ ├── View.zep │ ├── View │ │ └── Engine │ │ │ └── Php.zep │ └── ViewInterface.zep ├── Router │ ├── Http │ │ ├── DynamicRoute.zep │ │ └── StaticRoute.zep │ ├── Route.zep │ ├── Router.zep │ └── RouterInterface.zep ├── Session │ └── ManagerInterface.zep └── Std │ ├── ArrayBag.zep │ └── Collection │ ├── AbstractCollection.zep │ └── ArrayCollection.zep ├── phpunit.xml.dist ├── sandbox ├── annotation.php ├── em.php └── router.php ├── tests ├── _bootstrap.php ├── _data │ └── dump.sql ├── _support │ ├── AcceptanceHelper.php │ ├── ApiHelper.php │ ├── FunctionalHelper.php │ └── UnitHelper.php ├── acceptance.suite.yml ├── acceptance │ ├── AcceptanceTester.php │ └── _bootstrap.php ├── api.suite.yml ├── api │ ├── ApiTester.php │ ├── UsersGetNotFoundCept.php │ ├── UsersGetSuccessCept.php │ └── _bootstrap.php ├── ci │ ├── after_failure.sh │ ├── appveyor.bat │ ├── drivers.ini │ ├── install_zephir.sh │ ├── mysql.sh │ ├── owl.ini │ ├── pgsql.bat │ └── pgsql.sh ├── functional.suite.yml ├── functional │ ├── FunctionalTester.php │ └── _bootstrap.php ├── schemas │ ├── mysql │ │ └── dump.sql │ └── pgsql │ │ └── dump.sql ├── travis │ ├── appveyor.xml │ ├── mysql.travis.xml │ └── pgsql.travis.xml ├── unit.suite.yml └── unit │ ├── UnitTester.php │ └── _bootstrap.php └── unit-tests └── Owl ├── Tests ├── ApplicationTest.php ├── Bootstrap.php ├── Cache │ └── Driver │ │ ├── MemcacheTest.php │ │ ├── MemcachedTest.php │ │ ├── NativeArrayTest.php │ │ ├── RedisTest.php │ │ └── TestCase.php ├── ControllerTest.php ├── DBAL │ ├── ConnectionTest.php │ └── TestCase.php ├── EventManagerTest.php ├── Http │ ├── RequestTest.php │ ├── Response │ │ └── JsonTest.php │ └── ResponseTest.php ├── Log │ ├── LoggerTest.php │ ├── WriterBrowserTest.php │ ├── WriterFileTest.php │ └── WriterTest.php ├── Router │ ├── RouteTest.php │ └── RouterTest.php ├── ServiceManagerTest.php ├── Std │ └── ArrayBagTest.php ├── TestCase.php ├── Utils.php └── View │ └── EngineTest.php └── app ├── IndexController.php └── resources └── views ├── dynamic.phtml └── static.phtml /.editorconfig: -------------------------------------------------------------------------------- 1 | ; http://editorconfig.org/ 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = LF 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.php] 11 | indent_style = space 12 | indent_size = 4 13 | 14 | [*.zep] 15 | indent_style = tab 16 | 17 | [*.c] 18 | indent_style = tab 19 | 20 | [*.h] 21 | indent_style = tab 22 | 23 | [*.lemon] 24 | indent_style = tab 25 | 26 | [*.re] 27 | indent_style = tab -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ext/* linguist-vendored 2 | ide/* linguist-vendored 3 | examples/* linguist-vendored 4 | sandbox/* linguist-vendored 5 | tests/* linguist-vendored 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | .temp 4 | .settings/ 5 | .cproject 6 | .project 7 | *.lo 8 | *.la 9 | *.o 10 | *.so 11 | *.lai 12 | *.gch 13 | ext/Makefile.global 14 | ext/acinclude.m4 15 | ext/aclocal.m4 16 | ext/autom4te.cache/ 17 | ext/build/ 18 | ext/config.guess 19 | ext/config.h.in 20 | ext/config.sub 21 | ext/configure 22 | ext/configure.in 23 | ext/install-sh 24 | ext/ltmain.sh 25 | ext/missing 26 | ext/mkinstalldirs 27 | ext/run-tests.php 28 | ext/.deps 29 | ext/Makefile 30 | ext/Makefile.fragments 31 | ext/Makefile.objects 32 | ext/config.h 33 | ext/config.log 34 | ext/config.nice 35 | ext/config.status 36 | ext/libtool 37 | ext/.libs/ 38 | ext/modules/ 39 | /vendor/ 40 | compile-errors.log 41 | compile.log 42 | composer.lock 43 | phpunit.xml 44 | 45 | tests/_output/* 46 | -------------------------------------------------------------------------------- /DEVELOPMENT.md: -------------------------------------------------------------------------------- 1 | ## Working with subtree 2 | 3 | ```sh 4 | git remote add rest-app git@github.com:owl-framework/rest-app.git 5 | git subtree push --prefix=examples/rest-app/ rest-app master 6 | ``` 7 | 8 | ```sh 9 | git remote add mvc-app git@github.com:owl-framework/mvc-app.git 10 | git subtree push --prefix=examples/mvc-app/ mvc-app master 11 | ``` 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2015 Owl Team and Contributors http://owl.dmtry.me/ 3 | Maintainer: https://github.com/ovr http://dmtry.me/about 4 | 5 | MIT License 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. 24 | -------------------------------------------------------------------------------- /codeception.yml: -------------------------------------------------------------------------------- 1 | actor: Tester 2 | paths: 3 | tests: tests 4 | log: tests/_output 5 | data: tests/_data 6 | helpers: tests/_support 7 | settings: 8 | bootstrap: _bootstrap.php 9 | colors: true 10 | memory_limit: 1024M 11 | modules: 12 | config: 13 | Db: 14 | dsn: '' 15 | user: '' 16 | password: '' 17 | dump: tests/_data/dump.sql 18 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "owl/owl", 3 | "type": "extension", 4 | "description": "Owl is an extreme fast PHP framework powered by Zephir language and delivered as C-extension.", 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "Dmitry Patsura", 9 | "email": "talk@dmtry.me", 10 | "homepage": "http://dmtry.me/about" 11 | } 12 | ], 13 | "require": { 14 | "php": ">=5.4", 15 | "ext-json": "*" 16 | }, 17 | "require-dev": { 18 | "phalcon/zephir": "dev-master", 19 | "phpunit/phpunit": "~4.5", 20 | "codeception/codeception": "~2.0.12", 21 | "squizlabs/php_codesniffer": "~2.1" 22 | }, 23 | "suggest": { 24 | "ext-apc": "Allow using APC Cache\\Driver", 25 | "ext-memcache": "Allow using Memcache Cache\\Driver", 26 | "ext-memcached": "Allow using Memcached Cache\\Driver", 27 | "ext-phpredis": "Allow using Redis Cache\\Driver" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/dev-tools/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.lock -------------------------------------------------------------------------------- /examples/dev-tools/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2015 Owl Team and Contributors http://owl.dmtry.me/ 3 | Maintainer: https://github.com/ovr http://dmtry.me/about 4 | 5 | MIT License 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. 24 | -------------------------------------------------------------------------------- /examples/dev-tools/app/Command/Test.php: -------------------------------------------------------------------------------- 1 | http://dmtry.me/about 4 | 5 | MIT License 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. 24 | -------------------------------------------------------------------------------- /examples/micro/public/index.php: -------------------------------------------------------------------------------- 1 | add('/', ['action' => '/']); 8 | $router->add('/user/{id:int}/', ['action' => 'view']); 9 | $router->add('/users', ['action' => 'users']); 10 | 11 | $di->set('router', $router); 12 | 13 | $application = new \Owl\Application($di); 14 | $application->handle(\Owl\Http\Request::createFromGlobals(), new \Owl\Http\Response()); 15 | -------------------------------------------------------------------------------- /examples/multi-module/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.lock 3 | -------------------------------------------------------------------------------- /examples/multi-module/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2015 Owl Team and Contributors http://owl.dmtry.me/ 3 | Maintainer: https://github.com/ovr http://dmtry.me/about 4 | 5 | MIT License 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. 24 | -------------------------------------------------------------------------------- /examples/multi-module/app/modules/api/controllers/IndexController.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace RestApp\Api\Controller; 7 | 8 | use Owl\Mvc\Controller; 9 | 10 | /** 11 | * Class IndexController 12 | * @Path("/api") 13 | */ 14 | class IndexController extends Controller 15 | { 16 | /** 17 | * @Get 18 | * @Url("/", name="default") 19 | */ 20 | public function indexAction() 21 | { 22 | return array( 23 | 'info' => array( 24 | 'php' => array( 25 | 'version' => PHP_VERSION 26 | ), 27 | 'time' => time() 28 | ) 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /examples/multi-module/app/modules/api/controllers/UserController.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace RestApp\Api\Controller; 7 | 8 | use Owl\Mvc\Controller; 9 | 10 | /** 11 | * Class UserController 12 | * @Path("/api") 13 | */ 14 | class UserController extends Controller 15 | { 16 | /** 17 | * @Get 18 | * @Url("/user/{id:int}/") 19 | */ 20 | public function indexAction($id) 21 | { 22 | return array( 23 | 'user' => array( 24 | 'id' => $id 25 | ) 26 | ); 27 | } 28 | 29 | /** 30 | * @Get 31 | * @Url("/users") 32 | */ 33 | public function listAction() 34 | { 35 | //Get users from db 36 | 37 | return true; 38 | } 39 | 40 | /**x 41 | * @Post 42 | * @Url("/user") 43 | */ 44 | public function createAction() 45 | { 46 | //Create new user in db 47 | 48 | return true; 49 | } 50 | 51 | /** 52 | * @Delete 53 | * @Url("/user/{id:int}/") 54 | */ 55 | public function deleteAction() 56 | { 57 | //Remove user from db 58 | 59 | return true; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /examples/multi-module/app/modules/frontend/controllers/IndexController.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace RestApp\Frontend\Controller; 7 | 8 | use Owl\Mvc\Controller; 9 | 10 | /** 11 | * Class IndexController 12 | * @Path("/") 13 | */ 14 | class IndexController extends Controller 15 | { 16 | /** 17 | * @Get 18 | * @Url("/", name="default") 19 | */ 20 | public function indexAction() 21 | { 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /examples/multi-module/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "owl-framework/rest-app", 3 | "description": "Simple REST application powered by OwlPHP framework", 4 | "license": "MIT", 5 | "authors": [ 6 | { 7 | "name": "Dmitry Patsura", 8 | "email": "talk@dmtry.me" 9 | } 10 | ], 11 | "require": { 12 | "php": "~5.4" 13 | }, 14 | "autoload": { 15 | "psr-4": { 16 | "RestApp\\Api\\Controller\\": "app/modules/api/controllers", 17 | "RestApp\\Frontend\\Controller\\": "app/modules/frontend/controllers" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/multi-module/public/index.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | use Owl\Application; 7 | use Owl\Http\Request; 8 | use Owl\Router\Route; 9 | use Owl\Router\Router; 10 | 11 | include_once __DIR__ . '/../vendor/autoload.php'; 12 | 13 | $di = new Owl\Di\Container(); 14 | 15 | $router = new Router(); 16 | 17 | /** 18 | * Frontend 19 | */ 20 | $router->add('/', ['module' => 'Frontend', 'controller' => 'Index', 'action' => 'index']); 21 | 22 | /** 23 | * Api module - REST API 24 | */ 25 | $router->add('/api', ['module' => 'Api', 'controller' => 'Index', 'action' => 'index']); 26 | $router->add('/api/users', ['module' => 'Api', 'controller' => 'User', 'action' => 'list']); 27 | $router->add('/api/users/:id', ['module' => 'Api', 'controller' => 'User', 'action' => 'index']); 28 | $router->add('/api/users/:id', ['module' => 'Api', 'controller' => 'User', 'action' => 'create'], Route::POST); 29 | $router->add('/api/users/:id', ['module' => 'Api', 'controller' => 'User', 'action' => 'delete'], Route::DELETE); 30 | 31 | $di->set('router', $router); 32 | 33 | $application = new Application($di); 34 | $response = $application->handle(Request::createFromGlobals()); 35 | $response->send(); 36 | -------------------------------------------------------------------------------- /examples/mvc-app/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.lock 3 | -------------------------------------------------------------------------------- /examples/mvc-app/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2015 Owl Team and Contributors http://owl.dmtry.me/ 3 | Maintainer: https://github.com/ovr http://dmtry.me/about 4 | 5 | MIT License 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. 24 | -------------------------------------------------------------------------------- /examples/mvc-app/README.md: -------------------------------------------------------------------------------- 1 | ![Logo](http://owl.dmtry.me/img/repository-2.png "Owl Framework") 2 | 3 | Owl MVC Edition Skeleton 4 | ========================= 5 | 6 | Special edition for easy creation of MVC sites. 7 | 8 | Web Server Setup 9 | ---------------- 10 | 11 | ### PHP CLI Server 12 | 13 | The simplest way to get started if you are using PHP 5.4 or above is to start the internal PHP cli-server in the root directory: 14 | 15 | ```sh 16 | php -S 0.0.0.0:8080 -t public/ public/index.php 17 | ``` 18 | 19 | This will start the cli-server on port 8080, and bind it to all network interfaces. 20 | 21 | **Note:** The built-in CLI server is *for development only*. 22 | 23 | License 24 | ------- 25 | 26 | This project is open-sourced software licensed under the MIT License. See the LICENSE file for more information. 27 | -------------------------------------------------------------------------------- /examples/mvc-app/app/modules/common/resources/views/index/index.phtml: -------------------------------------------------------------------------------- 1 |

Hello, World!

2 | 3 |

Omg, It's first view

4 | -------------------------------------------------------------------------------- /examples/mvc-app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "owl/mvc-app", 3 | "description": "Simple MVC skeleton application for Owl framework", 4 | "license": "MIT", 5 | "authors": [ 6 | { 7 | "name": "Dmitry Patsura", 8 | "email": "talk@dmtry.me" 9 | } 10 | ], 11 | "require": { 12 | "php": "~5.4", 13 | "ext-json": "*", 14 | "ext-owl": ">=0.3" 15 | }, 16 | "autoload": { 17 | "psr-4": { 18 | "RestApp\\Common\\Controller\\": "app/modules/common/controllers" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /examples/rest-app/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.lock 3 | -------------------------------------------------------------------------------- /examples/rest-app/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2015 Owl Team and Contributors http://owl.dmtry.me/ 3 | Maintainer: https://github.com/ovr http://dmtry.me/about 4 | 5 | MIT License 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. 24 | -------------------------------------------------------------------------------- /examples/rest-app/README.md: -------------------------------------------------------------------------------- 1 | ![Logo](http://owl.dmtry.me/img/repository-2.png "Owl Framework") 2 | 3 | Owl Rest Edition Skeleton 4 | ========================= 5 | 6 | Special edition for easy creation of REST API services. 7 | 8 | Web Server Setup 9 | ---------------- 10 | 11 | ### PHP CLI Server 12 | 13 | The simplest way to get started if you are using PHP 5.4 or above is to start the internal PHP cli-server in the root directory: 14 | 15 | ```sh 16 | php -S 0.0.0.0:8080 -t public/ public/index.php 17 | ``` 18 | 19 | This will start the cli-server on port 8080, and bind it to all network interfaces. 20 | 21 | **Note:** The built-in CLI server is *for development only*. 22 | 23 | License 24 | ------- 25 | 26 | This project is open-sourced software licensed under the MIT License. 27 | See the LICENSE file for more information. 28 | -------------------------------------------------------------------------------- /examples/rest-app/app/modules/api/controllers/ProductController.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace RestApp\Api\Controller; 7 | 8 | use Exception; 9 | 10 | /** 11 | * Class ProductController 12 | * @Path("/api/products") 13 | */ 14 | class ProductController extends \Owl\Mvc\Controller 15 | { 16 | /** 17 | * @Get 18 | * @Url("/{id:int}/") 19 | */ 20 | public function indexAction($id) 21 | { 22 | throw new Exception('Not implemented', 500); 23 | } 24 | 25 | /** 26 | * @Get 27 | * @Url("/") 28 | */ 29 | public function listAction() 30 | { 31 | throw new Exception('Not implemented', 500); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /examples/rest-app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "owl/rest-app", 3 | "description": "Simple REST skeleton application for Owl framework", 4 | "license": "MIT", 5 | "authors": [ 6 | { 7 | "name": "Dmitry Patsura", 8 | "email": "talk@dmtry.me" 9 | } 10 | ], 11 | "require": { 12 | "php": "~5.4", 13 | "ext-json": "*", 14 | "ext-owl": ">=0.3" 15 | }, 16 | "autoload": { 17 | "psr-4": { 18 | "RestApp\\Api\\Controller\\": "app/modules/api/controllers" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /examples/rest-app/public/dev.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | use Owl\Application; 7 | use Owl\Http\Request; 8 | use Owl\Router\Route; 9 | use Owl\Router\Router; 10 | 11 | error_reporting(-1); 12 | ini_set('display_errors', 1); 13 | 14 | include_once __DIR__ . '/../vendor/autoload.php'; 15 | include_once __DIR__ . '/../app/Application.php'; 16 | 17 | $eventManager = new \Owl\Event\Manager(); 18 | 19 | $profiler = new Owl\Debug\Profiler(); 20 | $profiler->listen($eventManager); 21 | 22 | $application = new \RestApp\Application(new Owl\Di\Container(), $eventManager); 23 | $response = $application->bootstrap()->handle(Request::createFromGlobals(), new \Owl\Http\Response\Json()); 24 | 25 | $response = $profiler->setContent($response); 26 | $response->send(); 27 | -------------------------------------------------------------------------------- /examples/rest-app/public/index.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | use Owl\Application; 7 | use Owl\Http\Request; 8 | use Owl\Router\Route; 9 | use Owl\Router\Router; 10 | 11 | error_reporting(-1); 12 | ini_set('display_errors', 1); 13 | 14 | include_once __DIR__ . '/../vendor/autoload.php'; 15 | include_once __DIR__ . '/../app/Application.php'; 16 | 17 | $application = new \RestApp\Application(new Owl\Di\Container()); 18 | $response = $application->bootstrap()->handle(Request::createFromGlobals(), new \Owl\Http\Response\Json()); 19 | $response->send(); 20 | -------------------------------------------------------------------------------- /examples/simple/index.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | 7 | use Owl\Application; 8 | use Owl\Http\Request; 9 | 10 | $serviceManager = new Owl\Di\Container(); 11 | $serviceManager->set('router', new \Owl\Router\Router()); 12 | var_dump($serviceManager->get('router')); 13 | 14 | $application = new Application($serviceManager); 15 | $response = $application->handle(Request::createFromGlobals()); 16 | var_dump($response); 17 | 18 | $router = new \Owl\Router\Router(); 19 | $router->add("/", ['name' => 'default', 'action' => 'index', 'controller' => 'index', 'module' => 'index']); 20 | $router->add("/user/1/", ['name' => 'user-view-static', 'action' => 'view', 'controller' => 'user', 'module' => 'user']); 21 | 22 | var_dump($router->match("/")); 23 | var_dump($router->match("/user/1/")); 24 | 25 | var_dump( 26 | \Owl\Annotations\Reader::parse(' 27 | /** 28 | * @Post 29 | * @Url("/user/:id/") 30 | */ 31 | ') 32 | ); 33 | -------------------------------------------------------------------------------- /ext/clean: -------------------------------------------------------------------------------- 1 | for i in `find . -name "*.o"`; do 2 | rm -f $i 3 | done 4 | for i in `find . -name "*.lo"`; do 5 | rm -f $i 6 | done 7 | for i in `find . -name "*.gch"`; do 8 | rm -f $i 9 | done 10 | make clean 11 | phpize --clean 12 | -------------------------------------------------------------------------------- /ext/ext.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by Zephir do not modify it! */ 3 | 4 | #include "owl.h" -------------------------------------------------------------------------------- /ext/ext_config.h: -------------------------------------------------------------------------------- 1 | /* This file was generated automatically by Zephir do not modify it! */ 2 | #include "config.h" -------------------------------------------------------------------------------- /ext/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export CC="gcc" 3 | export CFLAGS="-O2 -Wall -fvisibility=hidden -flto -DZEPHIR_RELEASE=1" 4 | if [ -f Makefile ]; then 5 | sudo make --silent clean 6 | sudo phpize --silent --clean 7 | fi 8 | phpize --silent 9 | ./configure --silent --enable-owl 10 | make --silent && sudo make --silent install 11 | -------------------------------------------------------------------------------- /ext/kernel/exit.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | +------------------------------------------------------------------------+ 4 | | Zephir Language | 5 | +------------------------------------------------------------------------+ 6 | | Copyright (c) 2011-2015 Zephir Team (http://www.zephir-lang.com) | 7 | +------------------------------------------------------------------------+ 8 | | This source file is subject to the New BSD License that is bundled | 9 | | with this package in the file docs/LICENSE.txt. | 10 | | | 11 | | If you did not receive a copy of the license and are unable to | 12 | | obtain it through the world-wide-web, please send an email | 13 | | to license@zephir-lang.com so we can send you a copy immediately. | 14 | +------------------------------------------------------------------------+ 15 | | Authors: Song Yeung | 16 | +------------------------------------------------------------------------+ 17 | */ 18 | 19 | #ifndef ZEPHIR_KERNEL_EXIT_H 20 | #define ZEPHIR_KERNEL_EXIT_H 21 | 22 | #include 23 | 24 | void zephir_exit_empty(); 25 | void zephir_exit(zval *ptr); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /ext/kernel/extended/array.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | +------------------------------------------------------------------------+ 4 | | Zephir Language | 5 | +------------------------------------------------------------------------+ 6 | | Copyright (c) 2011-2015 Zephir Team (http://www.zephir-lang.com) | 7 | +------------------------------------------------------------------------+ 8 | | This source file is subject to the New BSD License that is bundled | 9 | | with this package in the file docs/LICENSE.txt. | 10 | | | 11 | | If you did not receive a copy of the license and are unable to | 12 | | obtain it through the world-wide-web, please send an email | 13 | | to license@zephir-lang.com so we can send you a copy immediately. | 14 | +------------------------------------------------------------------------+ 15 | | Authors: Andres Gutierrez | 16 | | Eduar Carvajal | 17 | +------------------------------------------------------------------------+ 18 | */ 19 | -------------------------------------------------------------------------------- /ext/kernel/extended/array.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | +------------------------------------------------------------------------+ 4 | | Zephir Language | 5 | +------------------------------------------------------------------------+ 6 | | Copyright (c) 2011-2015 Zephir Team (http://www.zephir-lang.com) | 7 | +------------------------------------------------------------------------+ 8 | | This source file is subject to the New BSD License that is bundled | 9 | | with this package in the file docs/LICENSE.txt. | 10 | | | 11 | | If you did not receive a copy of the license and are unable to | 12 | | obtain it through the world-wide-web, please send an email | 13 | | to license@zephir-lang.com so we can send you a copy immediately. | 14 | +------------------------------------------------------------------------+ 15 | | Authors: Andres Gutierrez | 16 | | Eduar Carvajal | 17 | +------------------------------------------------------------------------+ 18 | */ 19 | -------------------------------------------------------------------------------- /ext/kernel/fcall_internal.h: -------------------------------------------------------------------------------- 1 | #ifndef ZEPHIR_KERNEL_FCALL_INTERNAL_H 2 | #define ZEPHIR_KERNEL_FCALL_INTERNAL_H 3 | #endif 4 | -------------------------------------------------------------------------------- /ext/kernel/time.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | +------------------------------------------------------------------------+ 4 | | Zephir Language | 5 | +------------------------------------------------------------------------+ 6 | | Copyright (c) 2011-2015 Zephir Team (http://www.zephir-lang.com) | 7 | +------------------------------------------------------------------------+ 8 | | This source file is subject to the New BSD License that is bundled | 9 | | with this package in the file docs/LICENSE.txt. | 10 | | | 11 | | If you did not receive a copy of the license and are unable to | 12 | | obtain it through the world-wide-web, please send an email | 13 | | to license@zephir-lang.com so we can send you a copy immediately. | 14 | +------------------------------------------------------------------------+ 15 | */ 16 | 17 | #ifndef ZEPHIR_KERNEL_TIME_H 18 | #define ZEPHIR_KERNEL_TIME_H 19 | 20 | #include 21 | #include 22 | 23 | #define MICRO_IN_SEC 1000000.00 24 | 25 | void zephir_time(zval *return_value); 26 | #ifdef HAVE_GETTIMEOFDAY 27 | void zephir_microtime(zval *return_value, zval *get_as_float TSRMLS_DC); 28 | #endif 29 | 30 | #endif /* ZEPHIR_KERNEL_TIME_H */ 31 | -------------------------------------------------------------------------------- /ext/owl/annotations/annotation.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Owl_Annotations_Annotation) { 18 | 19 | ZEPHIR_REGISTER_CLASS(Owl\\Annotations, Annotation, owl, annotations_annotation, NULL, 0); 20 | 21 | zend_declare_property_null(owl_annotations_annotation_ce, SL("value"), ZEND_ACC_PUBLIC TSRMLS_CC); 22 | 23 | return SUCCESS; 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /ext/owl/annotations/annotation.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_annotations_annotation_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Annotations_Annotation); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/annotations/classannotationsresult.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_annotations_classannotationsresult_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Annotations_ClassAnnotationsResult); 5 | 6 | PHP_METHOD(Owl_Annotations_ClassAnnotationsResult, __construct); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_annotations_classannotationsresult___construct, 0, 0, 1) 9 | ZEND_ARG_ARRAY_INFO(0, annotations, 0) 10 | ZEND_ARG_ARRAY_INFO(0, methods, 1) 11 | ZEND_END_ARG_INFO() 12 | 13 | ZEPHIR_INIT_FUNCS(owl_annotations_classannotationsresult_method_entry) { 14 | PHP_ME(Owl_Annotations_ClassAnnotationsResult, __construct, arginfo_owl_annotations_classannotationsresult___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 15 | PHP_FE_END 16 | }; 17 | -------------------------------------------------------------------------------- /ext/owl/annotations/exception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Owl_Annotations_Exception) { 18 | 19 | ZEPHIR_REGISTER_CLASS_EX(Owl\\Annotations, Exception, owl, annotations_exception, owl_exception_ce, NULL, 0); 20 | 21 | return SUCCESS; 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/owl/annotations/exception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_annotations_exception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Annotations_Exception); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/annotations/parser.h: -------------------------------------------------------------------------------- 1 | #define PHANNOT_COMMA 1 2 | #define PHANNOT_AT 2 3 | #define PHANNOT_IDENTIFIER 3 4 | #define PHANNOT_PARENTHESES_OPEN 4 5 | #define PHANNOT_PARENTHESES_CLOSE 5 6 | #define PHANNOT_STRING 6 7 | #define PHANNOT_EQUALS 7 8 | #define PHANNOT_COLON 8 9 | #define PHANNOT_INTEGER 9 10 | #define PHANNOT_DOUBLE 10 11 | #define PHANNOT_NULL 11 12 | #define PHANNOT_FALSE 12 13 | #define PHANNOT_TRUE 13 14 | #define PHANNOT_BRACKET_OPEN 14 15 | #define PHANNOT_BRACKET_CLOSE 15 16 | #define PHANNOT_SBRACKET_OPEN 16 17 | #define PHANNOT_SBRACKET_CLOSE 17 18 | -------------------------------------------------------------------------------- /ext/owl/annotations/reader.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/memory.h" 16 | #include "kernel/operators.h" 17 | #include "owl/annotations/scanner.h" 18 | #include "owl/annotations/annot.h" 19 | 20 | 21 | ZEPHIR_INIT_CLASS(Owl_Annotations_Reader) { 22 | 23 | ZEPHIR_REGISTER_CLASS(Owl\\Annotations, Reader, owl, annotations_reader, owl_annotations_reader_method_entry, 0); 24 | 25 | return SUCCESS; 26 | 27 | } 28 | 29 | PHP_METHOD(Owl_Annotations_Reader, parse) { 30 | 31 | zval *comment_param = NULL, _0, _1; 32 | zval *comment = NULL; 33 | 34 | ZEPHIR_MM_GROW(); 35 | zephir_fetch_params(1, 1, 0, &comment_param); 36 | 37 | zephir_get_strval(comment, comment_param); 38 | 39 | 40 | ZEPHIR_SINIT_VAR(_0); 41 | ZVAL_LONG(&_0, 1); 42 | ZEPHIR_SINIT_VAR(_1); 43 | ZVAL_LONG(&_1, 2); 44 | phannot_parse_annotations(return_value, comment, &_0, &_1 TSRMLS_CC); 45 | RETURN_MM(); 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /ext/owl/annotations/reader.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_annotations_reader_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Annotations_Reader); 5 | 6 | PHP_METHOD(Owl_Annotations_Reader, parse); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_annotations_reader_parse, 0, 0, 1) 9 | ZEND_ARG_INFO(0, comment) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_annotations_reader_method_entry) { 13 | PHP_ME(Owl_Annotations_Reader, parse, arginfo_owl_annotations_reader_parse, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/applicationinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_ApplicationInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl, ApplicationInterface, owl, applicationinterface, owl_applicationinterface_method_entry); 18 | 19 | zend_declare_class_constant_string(owl_applicationinterface_ce, SL("ENV_PRODUCTION"), "production" TSRMLS_CC); 20 | 21 | zend_declare_class_constant_string(owl_applicationinterface_ce, SL("ENV_DEVELOPMENT"), "development" TSRMLS_CC); 22 | 23 | zend_declare_class_constant_string(owl_applicationinterface_ce, SL("EVENT_BEFORE_HANDLE"), "app:beforeHandle" TSRMLS_CC); 24 | 25 | zend_declare_class_constant_string(owl_applicationinterface_ce, SL("EVENT_AFTER_HANDLE"), "app:afterHandle" TSRMLS_CC); 26 | 27 | return SUCCESS; 28 | 29 | } 30 | 31 | ZEPHIR_DOC_METHOD(Owl_ApplicationInterface, __construct); 32 | 33 | /** 34 | * Handle Http Request 35 | */ 36 | ZEPHIR_DOC_METHOD(Owl_ApplicationInterface, handle); 37 | 38 | /** 39 | * Sets the default namespace 40 | */ 41 | ZEPHIR_DOC_METHOD(Owl_ApplicationInterface, setDefaultNamespace); 42 | 43 | -------------------------------------------------------------------------------- /ext/owl/applicationinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_applicationinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_ApplicationInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_applicationinterface___construct, 0, 0, 0) 7 | ZEND_ARG_OBJ_INFO(0, di, Owl\\Di\\ContainerInterface, 1) 8 | ZEND_ARG_OBJ_INFO(0, eventManager, Owl\\Event\\Manager, 1) 9 | ZEND_ARG_INFO(0, env) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_applicationinterface_handle, 0, 0, 1) 13 | ZEND_ARG_OBJ_INFO(0, request, Owl\\Http\\RequestInterface, 0) 14 | ZEND_ARG_OBJ_INFO(0, response, Owl\\Http\\ResponseInterface, 1) 15 | ZEND_END_ARG_INFO() 16 | 17 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_applicationinterface_setdefaultnamespace, 0, 0, 1) 18 | ZEND_ARG_INFO(0, namespaceName) 19 | ZEND_END_ARG_INFO() 20 | 21 | ZEPHIR_INIT_FUNCS(owl_applicationinterface_method_entry) { 22 | PHP_ABSTRACT_ME(Owl_ApplicationInterface, __construct, arginfo_owl_applicationinterface___construct) 23 | PHP_ABSTRACT_ME(Owl_ApplicationInterface, handle, arginfo_owl_applicationinterface_handle) 24 | PHP_ABSTRACT_ME(Owl_ApplicationInterface, setDefaultNamespace, arginfo_owl_applicationinterface_setdefaultnamespace) 25 | PHP_FE_END 26 | }; 27 | -------------------------------------------------------------------------------- /ext/owl/bridge/lynx/rest/entitycontroller.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Owl_Bridge_Lynx_Rest_EntityController) { 18 | 19 | ZEPHIR_REGISTER_CLASS_EX(Owl\\Bridge\\Lynx\\Rest, EntityController, owl, bridge_lynx_rest_entitycontroller, owl_mvc_controller_ce, owl_bridge_lynx_rest_entitycontroller_method_entry, 0); 20 | 21 | return SUCCESS; 22 | 23 | } 24 | 25 | PHP_METHOD(Owl_Bridge_Lynx_Rest_EntityController, getAction) { 26 | 27 | 28 | 29 | } 30 | 31 | PHP_METHOD(Owl_Bridge_Lynx_Rest_EntityController, deleteAction) { 32 | 33 | 34 | 35 | } 36 | 37 | PHP_METHOD(Owl_Bridge_Lynx_Rest_EntityController, createAction) { 38 | 39 | 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /ext/owl/bridge/lynx/rest/entitycontroller.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_bridge_lynx_rest_entitycontroller_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Bridge_Lynx_Rest_EntityController); 5 | 6 | PHP_METHOD(Owl_Bridge_Lynx_Rest_EntityController, getAction); 7 | PHP_METHOD(Owl_Bridge_Lynx_Rest_EntityController, deleteAction); 8 | PHP_METHOD(Owl_Bridge_Lynx_Rest_EntityController, createAction); 9 | 10 | ZEPHIR_INIT_FUNCS(owl_bridge_lynx_rest_entitycontroller_method_entry) { 11 | PHP_ME(Owl_Bridge_Lynx_Rest_EntityController, getAction, NULL, ZEND_ACC_PUBLIC) 12 | PHP_ME(Owl_Bridge_Lynx_Rest_EntityController, deleteAction, NULL, ZEND_ACC_PUBLIC) 13 | PHP_ME(Owl_Bridge_Lynx_Rest_EntityController, createAction, NULL, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/cache/driver.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Cache_Driver) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Cache, Driver, owl, cache_driver, owl_cache_driver_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | /** 24 | * To initialize cache provider 25 | * 26 | * @return mixed 27 | */ 28 | ZEPHIR_DOC_METHOD(Owl_Cache_Driver, getInstance); 29 | 30 | /** 31 | * Save data 32 | * 33 | * @param $id 34 | * @param $data 35 | * @param int $lifeTime 36 | * @return boolean 37 | */ 38 | ZEPHIR_DOC_METHOD(Owl_Cache_Driver, save); 39 | 40 | /** 41 | * Save data by id 42 | * 43 | * @param $id 44 | * @return boolean 45 | */ 46 | ZEPHIR_DOC_METHOD(Owl_Cache_Driver, delete); 47 | 48 | /** 49 | * Fetch data by id 50 | * 51 | * @param $id 52 | * @return mixed 53 | */ 54 | ZEPHIR_DOC_METHOD(Owl_Cache_Driver, get); 55 | 56 | /** 57 | * Is value exist? 58 | * 59 | * @param $id 60 | * @return boolean 61 | */ 62 | ZEPHIR_DOC_METHOD(Owl_Cache_Driver, exists); 63 | 64 | /** 65 | * Flush all values 66 | * 67 | * @return boolean 68 | */ 69 | ZEPHIR_DOC_METHOD(Owl_Cache_Driver, flush); 70 | 71 | -------------------------------------------------------------------------------- /ext/owl/cache/driver.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_cache_driver_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Cache_Driver); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_cache_driver_save, 0, 0, 2) 7 | ZEND_ARG_INFO(0, id) 8 | ZEND_ARG_INFO(0, data) 9 | ZEND_ARG_INFO(0, lifeTime) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_cache_driver_delete, 0, 0, 1) 13 | ZEND_ARG_INFO(0, id) 14 | ZEND_END_ARG_INFO() 15 | 16 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_cache_driver_get, 0, 0, 1) 17 | ZEND_ARG_INFO(0, id) 18 | ZEND_END_ARG_INFO() 19 | 20 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_cache_driver_exists, 0, 0, 1) 21 | ZEND_ARG_INFO(0, id) 22 | ZEND_END_ARG_INFO() 23 | 24 | ZEPHIR_INIT_FUNCS(owl_cache_driver_method_entry) { 25 | PHP_ABSTRACT_ME(Owl_Cache_Driver, getInstance, NULL) 26 | PHP_ABSTRACT_ME(Owl_Cache_Driver, save, arginfo_owl_cache_driver_save) 27 | PHP_ABSTRACT_ME(Owl_Cache_Driver, delete, arginfo_owl_cache_driver_delete) 28 | PHP_ABSTRACT_ME(Owl_Cache_Driver, get, arginfo_owl_cache_driver_get) 29 | PHP_ABSTRACT_ME(Owl_Cache_Driver, exists, arginfo_owl_cache_driver_exists) 30 | PHP_ABSTRACT_ME(Owl_Cache_Driver, flush, NULL) 31 | PHP_FE_END 32 | }; 33 | -------------------------------------------------------------------------------- /ext/owl/cache/driver/cachedriver.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_cache_driver_cachedriver_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Cache_Driver_CacheDriver); 5 | 6 | PHP_METHOD(Owl_Cache_Driver_CacheDriver, exists); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_cache_driver_cachedriver_exists, 0, 0, 1) 9 | ZEND_ARG_INFO(0, id) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_cache_driver_cachedriver_method_entry) { 13 | PHP_ME(Owl_Cache_Driver_CacheDriver, exists, arginfo_owl_cache_driver_cachedriver_exists, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/console/application.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_console_application_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Console_Application); 5 | 6 | PHP_METHOD(Owl_Console_Application, getCommands); 7 | PHP_METHOD(Owl_Console_Application, addCommand); 8 | PHP_METHOD(Owl_Console_Application, addCommands); 9 | 10 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_console_application_addcommand, 0, 0, 1) 11 | ZEND_ARG_OBJ_INFO(0, command, Owl\\Console\\CommandInterface, 0) 12 | ZEND_END_ARG_INFO() 13 | 14 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_console_application_addcommands, 0, 0, 1) 15 | ZEND_ARG_ARRAY_INFO(0, commands, 0) 16 | ZEND_END_ARG_INFO() 17 | 18 | ZEPHIR_INIT_FUNCS(owl_console_application_method_entry) { 19 | PHP_ME(Owl_Console_Application, getCommands, NULL, ZEND_ACC_PUBLIC) 20 | PHP_ME(Owl_Console_Application, addCommand, arginfo_owl_console_application_addcommand, ZEND_ACC_PUBLIC) 21 | PHP_ME(Owl_Console_Application, addCommands, arginfo_owl_console_application_addcommands, ZEND_ACC_PUBLIC) 22 | PHP_FE_END 23 | }; 24 | -------------------------------------------------------------------------------- /ext/owl/console/commandinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Console_CommandInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Console, CommandInterface, owl, console_commandinterface, NULL); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /ext/owl/console/commandinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_console_commandinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Console_CommandInterface); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/dbal/driver/driverinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_DBAL_Driver_DriverInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\DBAL\\Driver, DriverInterface, owl, dbal_driver_driverinterface, owl_dbal_driver_driverinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | ZEPHIR_DOC_METHOD(Owl_DBAL_Driver_DriverInterface, isConnected); 24 | 25 | ZEPHIR_DOC_METHOD(Owl_DBAL_Driver_DriverInterface, getNewPlatform); 26 | 27 | ZEPHIR_DOC_METHOD(Owl_DBAL_Driver_DriverInterface, lastInsertId); 28 | 29 | ZEPHIR_DOC_METHOD(Owl_DBAL_Driver_DriverInterface, prepare); 30 | 31 | -------------------------------------------------------------------------------- /ext/owl/dbal/driver/driverinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_dbal_driver_driverinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_DBAL_Driver_DriverInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_dbal_driver_driverinterface_prepare, 0, 0, 1) 7 | ZEND_ARG_INFO(0, statement) 8 | ZEND_END_ARG_INFO() 9 | 10 | ZEPHIR_INIT_FUNCS(owl_dbal_driver_driverinterface_method_entry) { 11 | PHP_ABSTRACT_ME(Owl_DBAL_Driver_DriverInterface, isConnected, NULL) 12 | PHP_ABSTRACT_ME(Owl_DBAL_Driver_DriverInterface, getNewPlatform, NULL) 13 | PHP_ABSTRACT_ME(Owl_DBAL_Driver_DriverInterface, lastInsertId, NULL) 14 | PHP_ABSTRACT_ME(Owl_DBAL_Driver_DriverInterface, prepare, arginfo_owl_dbal_driver_driverinterface_prepare) 15 | PHP_FE_END 16 | }; 17 | -------------------------------------------------------------------------------- /ext/owl/dbal/driver/mysql.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/fcall.h" 16 | #include "kernel/memory.h" 17 | 18 | 19 | ZEPHIR_INIT_CLASS(Owl_DBAL_Driver_MySQL) { 20 | 21 | ZEPHIR_REGISTER_CLASS_EX(Owl\\DBAL\\Driver, MySQL, owl, dbal_driver_mysql, owl_dbal_driver_abstractpdo_ce, owl_dbal_driver_mysql_method_entry, 0); 22 | 23 | zend_class_implements(owl_dbal_driver_mysql_ce TSRMLS_CC, 1, owl_dbal_driver_driverinterface_ce); 24 | return SUCCESS; 25 | 26 | } 27 | 28 | PHP_METHOD(Owl_DBAL_Driver_MySQL, getNewPlatform) { 29 | 30 | int ZEPHIR_LAST_CALL_STATUS; 31 | 32 | ZEPHIR_MM_GROW(); 33 | 34 | object_init_ex(return_value, owl_dbal_platform_mysql_ce); 35 | if (zephir_has_constructor(return_value TSRMLS_CC)) { 36 | ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); 37 | zephir_check_call_status(); 38 | } 39 | RETURN_MM(); 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /ext/owl/dbal/driver/mysql.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_dbal_driver_mysql_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_DBAL_Driver_MySQL); 5 | 6 | PHP_METHOD(Owl_DBAL_Driver_MySQL, getNewPlatform); 7 | 8 | ZEPHIR_INIT_FUNCS(owl_dbal_driver_mysql_method_entry) { 9 | PHP_ME(Owl_DBAL_Driver_MySQL, getNewPlatform, NULL, ZEND_ACC_PUBLIC) 10 | PHP_FE_END 11 | }; 12 | -------------------------------------------------------------------------------- /ext/owl/dbal/driver/pdo.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_dbal_driver_pdo_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_DBAL_Driver_Pdo); 5 | 6 | PHP_METHOD(Owl_DBAL_Driver_Pdo, __construct); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_dbal_driver_pdo___construct, 0, 0, 1) 9 | ZEND_ARG_INFO(0, dsn) 10 | ZEND_ARG_INFO(0, username) 11 | ZEND_ARG_INFO(0, password) 12 | ZEND_ARG_ARRAY_INFO(0, options, 1) 13 | ZEND_END_ARG_INFO() 14 | 15 | ZEPHIR_INIT_FUNCS(owl_dbal_driver_pdo_method_entry) { 16 | PHP_ME(Owl_DBAL_Driver_Pdo, __construct, arginfo_owl_dbal_driver_pdo___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 17 | PHP_FE_END 18 | }; 19 | -------------------------------------------------------------------------------- /ext/owl/dbal/driver/pgsql.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/fcall.h" 16 | #include "kernel/memory.h" 17 | 18 | 19 | ZEPHIR_INIT_CLASS(Owl_DBAL_Driver_PgSQL) { 20 | 21 | ZEPHIR_REGISTER_CLASS_EX(Owl\\DBAL\\Driver, PgSQL, owl, dbal_driver_pgsql, owl_dbal_driver_abstractpdo_ce, owl_dbal_driver_pgsql_method_entry, 0); 22 | 23 | zend_class_implements(owl_dbal_driver_pgsql_ce TSRMLS_CC, 1, owl_dbal_driver_driverinterface_ce); 24 | return SUCCESS; 25 | 26 | } 27 | 28 | PHP_METHOD(Owl_DBAL_Driver_PgSQL, getNewPlatform) { 29 | 30 | int ZEPHIR_LAST_CALL_STATUS; 31 | 32 | ZEPHIR_MM_GROW(); 33 | 34 | object_init_ex(return_value, owl_dbal_platform_pgsql_ce); 35 | if (zephir_has_constructor(return_value TSRMLS_CC)) { 36 | ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); 37 | zephir_check_call_status(); 38 | } 39 | RETURN_MM(); 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /ext/owl/dbal/driver/pgsql.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_dbal_driver_pgsql_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_DBAL_Driver_PgSQL); 5 | 6 | PHP_METHOD(Owl_DBAL_Driver_PgSQL, getNewPlatform); 7 | 8 | ZEPHIR_INIT_FUNCS(owl_dbal_driver_pgsql_method_entry) { 9 | PHP_ME(Owl_DBAL_Driver_PgSQL, getNewPlatform, NULL, ZEND_ACC_PUBLIC) 10 | PHP_FE_END 11 | }; 12 | -------------------------------------------------------------------------------- /ext/owl/dbal/exception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Owl_DBAL_Exception) { 18 | 19 | ZEPHIR_REGISTER_CLASS_EX(Owl\\DBAL, Exception, owl, dbal_exception, owl_exception_ce, NULL, 0); 20 | 21 | return SUCCESS; 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/owl/dbal/exception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_dbal_exception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_DBAL_Exception); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/dbal/platform/mysql.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/concat.h" 16 | #include "kernel/operators.h" 17 | #include "kernel/memory.h" 18 | 19 | 20 | ZEPHIR_INIT_CLASS(Owl_DBAL_Platform_MySQL) { 21 | 22 | ZEPHIR_REGISTER_CLASS(Owl\\DBAL\\Platform, MySQL, owl, dbal_platform_mysql, owl_dbal_platform_mysql_method_entry, 0); 23 | 24 | zend_class_implements(owl_dbal_platform_mysql_ce TSRMLS_CC, 1, owl_dbal_platform_platforminterface_ce); 25 | return SUCCESS; 26 | 27 | } 28 | 29 | PHP_METHOD(Owl_DBAL_Platform_MySQL, wrap) { 30 | 31 | zval *id_param = NULL; 32 | zval *id = NULL; 33 | 34 | ZEPHIR_MM_GROW(); 35 | zephir_fetch_params(1, 1, 0, &id_param); 36 | 37 | zephir_get_strval(id, id_param); 38 | 39 | 40 | ZEPHIR_CONCAT_SVS(return_value, "`", id, "`"); 41 | RETURN_MM(); 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /ext/owl/dbal/platform/mysql.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_dbal_platform_mysql_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_DBAL_Platform_MySQL); 5 | 6 | PHP_METHOD(Owl_DBAL_Platform_MySQL, wrap); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_dbal_platform_mysql_wrap, 0, 0, 1) 9 | ZEND_ARG_INFO(0, id) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_dbal_platform_mysql_method_entry) { 13 | PHP_ME(Owl_DBAL_Platform_MySQL, wrap, arginfo_owl_dbal_platform_mysql_wrap, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/dbal/platform/pgsql.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/operators.h" 16 | #include "kernel/memory.h" 17 | 18 | 19 | ZEPHIR_INIT_CLASS(Owl_DBAL_Platform_PgSQL) { 20 | 21 | ZEPHIR_REGISTER_CLASS(Owl\\DBAL\\Platform, PgSQL, owl, dbal_platform_pgsql, owl_dbal_platform_pgsql_method_entry, 0); 22 | 23 | zend_class_implements(owl_dbal_platform_pgsql_ce TSRMLS_CC, 1, owl_dbal_platform_platforminterface_ce); 24 | return SUCCESS; 25 | 26 | } 27 | 28 | PHP_METHOD(Owl_DBAL_Platform_PgSQL, wrap) { 29 | 30 | zval *id_param = NULL; 31 | zval *id = NULL; 32 | 33 | ZEPHIR_MM_GROW(); 34 | zephir_fetch_params(1, 1, 0, &id_param); 35 | 36 | zephir_get_strval(id, id_param); 37 | 38 | 39 | RETURN_CTOR(id); 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /ext/owl/dbal/platform/pgsql.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_dbal_platform_pgsql_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_DBAL_Platform_PgSQL); 5 | 6 | PHP_METHOD(Owl_DBAL_Platform_PgSQL, wrap); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_dbal_platform_pgsql_wrap, 0, 0, 1) 9 | ZEND_ARG_INFO(0, id) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_dbal_platform_pgsql_method_entry) { 13 | PHP_ME(Owl_DBAL_Platform_PgSQL, wrap, arginfo_owl_dbal_platform_pgsql_wrap, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/dbal/platform/platforminterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_DBAL_Platform_PlatformInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\DBAL\\Platform, PlatformInterface, owl, dbal_platform_platforminterface, owl_dbal_platform_platforminterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | ZEPHIR_DOC_METHOD(Owl_DBAL_Platform_PlatformInterface, wrap); 24 | 25 | -------------------------------------------------------------------------------- /ext/owl/dbal/platform/platforminterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_dbal_platform_platforminterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_DBAL_Platform_PlatformInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_dbal_platform_platforminterface_wrap, 0, 0, 1) 7 | ZEND_ARG_INFO(0, id) 8 | ZEND_END_ARG_INFO() 9 | 10 | ZEPHIR_INIT_FUNCS(owl_dbal_platform_platforminterface_method_entry) { 11 | PHP_ABSTRACT_ME(Owl_DBAL_Platform_PlatformInterface, wrap, arginfo_owl_dbal_platform_platforminterface_wrap) 12 | PHP_FE_END 13 | }; 14 | -------------------------------------------------------------------------------- /ext/owl/debug/memoryprofiler.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_debug_memoryprofiler_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Debug_MemoryProfiler); 5 | 6 | PHP_METHOD(Owl_Debug_MemoryProfiler, getPlatformInfo); 7 | PHP_METHOD(Owl_Debug_MemoryProfiler, objectsList); 8 | 9 | ZEPHIR_INIT_FUNCS(owl_debug_memoryprofiler_method_entry) { 10 | PHP_ME(Owl_Debug_MemoryProfiler, getPlatformInfo, NULL, ZEND_ACC_PUBLIC) 11 | PHP_ME(Owl_Debug_MemoryProfiler, objectsList, NULL, ZEND_ACC_PUBLIC) 12 | PHP_FE_END 13 | }; 14 | -------------------------------------------------------------------------------- /ext/owl/di/containerinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Di_ContainerInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Di, ContainerInterface, owl, di_containerinterface, owl_di_containerinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | ZEPHIR_DOC_METHOD(Owl_Di_ContainerInterface, setService); 24 | 25 | ZEPHIR_DOC_METHOD(Owl_Di_ContainerInterface, set); 26 | 27 | ZEPHIR_DOC_METHOD(Owl_Di_ContainerInterface, has); 28 | 29 | ZEPHIR_DOC_METHOD(Owl_Di_ContainerInterface, get); 30 | 31 | ZEPHIR_DOC_METHOD(Owl_Di_ContainerInterface, getService); 32 | 33 | -------------------------------------------------------------------------------- /ext/owl/di/containerinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_di_containerinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Di_ContainerInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_di_containerinterface_setservice, 0, 0, 2) 7 | ZEND_ARG_INFO(0, name) 8 | ZEND_ARG_INFO(0, definition) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_di_containerinterface_set, 0, 0, 2) 12 | ZEND_ARG_INFO(0, name) 13 | ZEND_ARG_INFO(0, definition) 14 | ZEND_END_ARG_INFO() 15 | 16 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_di_containerinterface_has, 0, 0, 1) 17 | ZEND_ARG_INFO(0, name) 18 | ZEND_END_ARG_INFO() 19 | 20 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_di_containerinterface_get, 0, 0, 1) 21 | ZEND_ARG_INFO(0, name) 22 | ZEND_END_ARG_INFO() 23 | 24 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_di_containerinterface_getservice, 0, 0, 1) 25 | ZEND_ARG_INFO(0, name) 26 | ZEND_END_ARG_INFO() 27 | 28 | ZEPHIR_INIT_FUNCS(owl_di_containerinterface_method_entry) { 29 | PHP_ABSTRACT_ME(Owl_Di_ContainerInterface, setService, arginfo_owl_di_containerinterface_setservice) 30 | PHP_ABSTRACT_ME(Owl_Di_ContainerInterface, set, arginfo_owl_di_containerinterface_set) 31 | PHP_ABSTRACT_ME(Owl_Di_ContainerInterface, has, arginfo_owl_di_containerinterface_has) 32 | PHP_ABSTRACT_ME(Owl_Di_ContainerInterface, get, arginfo_owl_di_containerinterface_get) 33 | PHP_ABSTRACT_ME(Owl_Di_ContainerInterface, getService, arginfo_owl_di_containerinterface_getservice) 34 | PHP_FE_END 35 | }; 36 | -------------------------------------------------------------------------------- /ext/owl/di/servicedefinition.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_di_servicedefinition_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Di_ServiceDefinition); 5 | 6 | PHP_METHOD(Owl_Di_ServiceDefinition, getName); 7 | PHP_METHOD(Owl_Di_ServiceDefinition, getDefinition); 8 | PHP_METHOD(Owl_Di_ServiceDefinition, getShared); 9 | PHP_METHOD(Owl_Di_ServiceDefinition, getResolved); 10 | PHP_METHOD(Owl_Di_ServiceDefinition, __construct); 11 | 12 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_di_servicedefinition___construct, 0, 0, 2) 13 | ZEND_ARG_INFO(0, name) 14 | ZEND_ARG_INFO(0, definition) 15 | ZEND_ARG_INFO(0, shared) 16 | ZEND_END_ARG_INFO() 17 | 18 | ZEPHIR_INIT_FUNCS(owl_di_servicedefinition_method_entry) { 19 | PHP_ME(Owl_Di_ServiceDefinition, getName, NULL, ZEND_ACC_PUBLIC) 20 | PHP_ME(Owl_Di_ServiceDefinition, getDefinition, NULL, ZEND_ACC_PUBLIC) 21 | PHP_ME(Owl_Di_ServiceDefinition, getShared, NULL, ZEND_ACC_PUBLIC) 22 | PHP_ME(Owl_Di_ServiceDefinition, getResolved, NULL, ZEND_ACC_PUBLIC) 23 | PHP_ME(Owl_Di_ServiceDefinition, __construct, arginfo_owl_di_servicedefinition___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL|ZEND_ACC_CTOR) 24 | PHP_FE_END 25 | }; 26 | -------------------------------------------------------------------------------- /ext/owl/di/servicedefinitioninterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Di_ServiceDefinitionInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Di, ServiceDefinitionInterface, owl, di_servicedefinitioninterface, NULL); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /ext/owl/di/servicedefinitioninterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_di_servicedefinitioninterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Di_ServiceDefinitionInterface); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/dispatcherinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_DispatcherInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl, DispatcherInterface, owl, dispatcherinterface, owl_dispatcherinterface_method_entry); 18 | 19 | zend_declare_class_constant_string(owl_dispatcherinterface_ce, SL("EVENT_ROUTER_BEFORE_EXECUTE"), "dispatch:beforeExecuteRoute" TSRMLS_CC); 20 | 21 | zend_declare_class_constant_string(owl_dispatcherinterface_ce, SL("EVENT_ROUTER_AFTER_EXECUTE"), "dispatch:afterExecuteRoute" TSRMLS_CC); 22 | 23 | zend_declare_class_constant_string(owl_dispatcherinterface_ce, SL("EVENT_AFTER_ACTION"), "dispatch:afterAction" TSRMLS_CC); 24 | 25 | zend_declare_class_constant_string(owl_dispatcherinterface_ce, SL("EVENT_AFTER_INIT"), "dispatch:afterInitialize" TSRMLS_CC); 26 | 27 | return SUCCESS; 28 | 29 | } 30 | 31 | ZEPHIR_DOC_METHOD(Owl_DispatcherInterface, dispatch); 32 | 33 | -------------------------------------------------------------------------------- /ext/owl/dispatcherinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_dispatcherinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_DispatcherInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_dispatcherinterface_dispatch, 0, 0, 2) 7 | ZEND_ARG_INFO(0, parameters) 8 | ZEND_ARG_INFO(0, callParameters) 9 | ZEND_ARG_INFO(0, response) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_dispatcherinterface_method_entry) { 13 | PHP_ABSTRACT_ME(Owl_DispatcherInterface, dispatch, arginfo_owl_dispatcherinterface_dispatch) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/event/event.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/object.h" 16 | #include "kernel/memory.h" 17 | 18 | 19 | ZEPHIR_INIT_CLASS(Owl_Event_Event) { 20 | 21 | ZEPHIR_REGISTER_CLASS(Owl\\Event, Event, owl, event_event, owl_event_event_method_entry, 0); 22 | 23 | zend_declare_property_null(owl_event_event_ce, SL("name"), ZEND_ACC_PROTECTED TSRMLS_CC); 24 | 25 | zend_declare_property_null(owl_event_event_ce, SL("data"), ZEND_ACC_PROTECTED TSRMLS_CC); 26 | 27 | return SUCCESS; 28 | 29 | } 30 | 31 | PHP_METHOD(Owl_Event_Event, getName) { 32 | 33 | 34 | RETURN_MEMBER(this_ptr, "name"); 35 | 36 | } 37 | 38 | PHP_METHOD(Owl_Event_Event, getData) { 39 | 40 | 41 | RETURN_MEMBER(this_ptr, "data"); 42 | 43 | } 44 | 45 | PHP_METHOD(Owl_Event_Event, __construct) { 46 | 47 | zval *name, *data; 48 | 49 | zephir_fetch_params(0, 2, 0, &name, &data); 50 | 51 | 52 | 53 | zephir_update_property_this(this_ptr, SL("name"), name TSRMLS_CC); 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /ext/owl/event/event.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_event_event_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Event_Event); 5 | 6 | PHP_METHOD(Owl_Event_Event, getName); 7 | PHP_METHOD(Owl_Event_Event, getData); 8 | PHP_METHOD(Owl_Event_Event, __construct); 9 | 10 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_event_event___construct, 0, 0, 2) 11 | ZEND_ARG_INFO(0, name) 12 | ZEND_ARG_INFO(0, data) 13 | ZEND_END_ARG_INFO() 14 | 15 | ZEPHIR_INIT_FUNCS(owl_event_event_method_entry) { 16 | PHP_ME(Owl_Event_Event, getName, NULL, ZEND_ACC_PUBLIC) 17 | PHP_ME(Owl_Event_Event, getData, NULL, ZEND_ACC_PUBLIC) 18 | PHP_ME(Owl_Event_Event, __construct, arginfo_owl_event_event___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 19 | PHP_FE_END 20 | }; 21 | -------------------------------------------------------------------------------- /ext/owl/event/manager.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_event_manager_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Event_Manager); 5 | 6 | PHP_METHOD(Owl_Event_Manager, listen); 7 | PHP_METHOD(Owl_Event_Manager, emit); 8 | static zend_object_value zephir_init_properties_Owl_Event_Manager(zend_class_entry *class_type TSRMLS_DC); 9 | 10 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_event_manager_listen, 0, 0, 2) 11 | ZEND_ARG_INFO(0, eventName) 12 | ZEND_ARG_INFO(0, callback) 13 | ZEND_END_ARG_INFO() 14 | 15 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_event_manager_emit, 0, 0, 1) 16 | ZEND_ARG_INFO(0, eventName) 17 | ZEND_ARG_INFO(0, data) 18 | ZEND_END_ARG_INFO() 19 | 20 | ZEPHIR_INIT_FUNCS(owl_event_manager_method_entry) { 21 | PHP_ME(Owl_Event_Manager, listen, arginfo_owl_event_manager_listen, ZEND_ACC_PUBLIC) 22 | PHP_ME(Owl_Event_Manager, emit, arginfo_owl_event_manager_emit, ZEND_ACC_PUBLIC) 23 | PHP_FE_END 24 | }; 25 | -------------------------------------------------------------------------------- /ext/owl/exception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../php_ext.h" 8 | #include "../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Owl_Exception) { 18 | 19 | ZEPHIR_REGISTER_CLASS_EX(Owl, Exception, owl, exception, zend_exception_get_default(TSRMLS_C), NULL, 0); 20 | 21 | return SUCCESS; 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/owl/exception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_exception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Exception); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/filter/abstractfilter.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Owl_Filter_AbstractFilter) { 18 | 19 | ZEPHIR_REGISTER_CLASS(Owl\\Filter, AbstractFilter, owl, filter_abstractfilter, NULL, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); 20 | 21 | zend_class_implements(owl_filter_abstractfilter_ce TSRMLS_CC, 1, owl_filter_filterinterface_ce); 22 | return SUCCESS; 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /ext/owl/filter/abstractfilter.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_filter_abstractfilter_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Filter_AbstractFilter); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/filter/email.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/memory.h" 16 | #include "kernel/fcall.h" 17 | 18 | 19 | ZEPHIR_INIT_CLASS(Owl_Filter_Email) { 20 | 21 | ZEPHIR_REGISTER_CLASS_EX(Owl\\Filter, Email, owl, filter_email, owl_filter_abstractfilter_ce, owl_filter_email_method_entry, 0); 22 | 23 | return SUCCESS; 24 | 25 | } 26 | 27 | PHP_METHOD(Owl_Filter_Email, filter) { 28 | 29 | int ZEPHIR_LAST_CALL_STATUS; 30 | zval *value, _0; 31 | 32 | ZEPHIR_MM_GROW(); 33 | zephir_fetch_params(1, 1, 0, &value); 34 | 35 | 36 | 37 | ZEPHIR_SINIT_VAR(_0); 38 | ZVAL_LONG(&_0, 517); 39 | ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 17, value, &_0); 40 | zephir_check_call_status(); 41 | RETURN_MM(); 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /ext/owl/filter/email.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_filter_email_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Filter_Email); 5 | 6 | PHP_METHOD(Owl_Filter_Email, filter); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_filter_email_filter, 0, 0, 1) 9 | ZEND_ARG_INFO(0, value) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_filter_email_method_entry) { 13 | PHP_ME(Owl_Filter_Email, filter, arginfo_owl_filter_email_filter, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/filter/filterinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Filter_FilterInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Filter, FilterInterface, owl, filter_filterinterface, owl_filter_filterinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | /** 24 | * Returns the result of filtering $value 25 | */ 26 | ZEPHIR_DOC_METHOD(Owl_Filter_FilterInterface, filter); 27 | 28 | -------------------------------------------------------------------------------- /ext/owl/filter/filterinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_filter_filterinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Filter_FilterInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_filter_filterinterface_filter, 0, 0, 1) 7 | ZEND_ARG_INFO(0, value) 8 | ZEND_END_ARG_INFO() 9 | 10 | ZEPHIR_INIT_FUNCS(owl_filter_filterinterface_method_entry) { 11 | PHP_ABSTRACT_ME(Owl_Filter_FilterInterface, filter, arginfo_owl_filter_filterinterface_filter) 12 | PHP_FE_END 13 | }; 14 | -------------------------------------------------------------------------------- /ext/owl/filter/striptags.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/fcall.h" 16 | #include "kernel/memory.h" 17 | 18 | 19 | ZEPHIR_INIT_CLASS(Owl_Filter_StripTags) { 20 | 21 | ZEPHIR_REGISTER_CLASS_EX(Owl\\Filter, StripTags, owl, filter_striptags, owl_filter_abstractfilter_ce, owl_filter_striptags_method_entry, 0); 22 | 23 | return SUCCESS; 24 | 25 | } 26 | 27 | PHP_METHOD(Owl_Filter_StripTags, filter) { 28 | 29 | int ZEPHIR_LAST_CALL_STATUS; 30 | zval *value; 31 | 32 | ZEPHIR_MM_GROW(); 33 | zephir_fetch_params(1, 1, 0, &value); 34 | 35 | 36 | 37 | ZEPHIR_RETURN_CALL_FUNCTION("strip_tags", NULL, 18, value); 38 | zephir_check_call_status(); 39 | RETURN_MM(); 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /ext/owl/filter/striptags.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_filter_striptags_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Filter_StripTags); 5 | 6 | PHP_METHOD(Owl_Filter_StripTags, filter); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_filter_striptags_filter, 0, 0, 1) 9 | ZEND_ARG_INFO(0, value) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_filter_striptags_method_entry) { 13 | PHP_ME(Owl_Filter_StripTags, filter, arginfo_owl_filter_striptags_filter, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/filter/trim.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/string.h" 16 | #include "kernel/memory.h" 17 | 18 | 19 | ZEPHIR_INIT_CLASS(Owl_Filter_Trim) { 20 | 21 | ZEPHIR_REGISTER_CLASS_EX(Owl\\Filter, Trim, owl, filter_trim, owl_filter_abstractfilter_ce, owl_filter_trim_method_entry, 0); 22 | 23 | return SUCCESS; 24 | 25 | } 26 | 27 | PHP_METHOD(Owl_Filter_Trim, filter) { 28 | 29 | zval *value; 30 | 31 | zephir_fetch_params(0, 1, 0, &value); 32 | 33 | 34 | 35 | zephir_fast_trim(return_value, value, NULL , ZEPHIR_TRIM_BOTH TSRMLS_CC); 36 | return; 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /ext/owl/filter/trim.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_filter_trim_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Filter_Trim); 5 | 6 | PHP_METHOD(Owl_Filter_Trim, filter); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_filter_trim_filter, 0, 0, 1) 9 | ZEND_ARG_INFO(0, value) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_filter_trim_method_entry) { 13 | PHP_ME(Owl_Filter_Trim, filter, arginfo_owl_filter_trim_filter, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/filter/url.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/memory.h" 16 | #include "kernel/fcall.h" 17 | 18 | 19 | ZEPHIR_INIT_CLASS(Owl_Filter_Url) { 20 | 21 | ZEPHIR_REGISTER_CLASS_EX(Owl\\Filter, Url, owl, filter_url, owl_filter_abstractfilter_ce, owl_filter_url_method_entry, 0); 22 | 23 | return SUCCESS; 24 | 25 | } 26 | 27 | PHP_METHOD(Owl_Filter_Url, filter) { 28 | 29 | int ZEPHIR_LAST_CALL_STATUS; 30 | zval *value, _0; 31 | 32 | ZEPHIR_MM_GROW(); 33 | zephir_fetch_params(1, 1, 0, &value); 34 | 35 | 36 | 37 | ZEPHIR_SINIT_VAR(_0); 38 | ZVAL_LONG(&_0, 518); 39 | ZEPHIR_RETURN_CALL_FUNCTION("filter_var", NULL, 17, value, &_0); 40 | zephir_check_call_status(); 41 | RETURN_MM(); 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /ext/owl/filter/url.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_filter_url_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Filter_Url); 5 | 6 | PHP_METHOD(Owl_Filter_Url, filter); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_filter_url_filter, 0, 0, 1) 9 | ZEND_ARG_INFO(0, value) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_filter_url_method_entry) { 13 | PHP_ME(Owl_Filter_Url, filter, arginfo_owl_filter_url_filter, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/http/headersbag.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_http_headersbag_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Http_HeadersBag); 5 | 6 | PHP_METHOD(Owl_Http_HeadersBag, send); 7 | 8 | ZEPHIR_INIT_FUNCS(owl_http_headersbag_method_entry) { 9 | PHP_ME(Owl_Http_HeadersBag, send, NULL, ZEND_ACC_PUBLIC) 10 | PHP_FE_END 11 | }; 12 | -------------------------------------------------------------------------------- /ext/owl/http/requestinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Http_RequestInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Http, RequestInterface, owl, http_requestinterface, owl_http_requestinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | /** 24 | * Get Request's URI 25 | */ 26 | ZEPHIR_DOC_METHOD(Owl_Http_RequestInterface, getUri); 27 | 28 | /** 29 | * Get Request's path (URI without GET parameters) 30 | */ 31 | ZEPHIR_DOC_METHOD(Owl_Http_RequestInterface, getPath); 32 | 33 | /** 34 | * Get parameter from $_GET 35 | */ 36 | ZEPHIR_DOC_METHOD(Owl_Http_RequestInterface, getParam); 37 | 38 | /** 39 | * Get parameter from $_POST 40 | */ 41 | ZEPHIR_DOC_METHOD(Owl_Http_RequestInterface, getPost); 42 | 43 | /** 44 | * Get parameter from $_SERVER 45 | */ 46 | ZEPHIR_DOC_METHOD(Owl_Http_RequestInterface, getServer); 47 | 48 | /** 49 | * Get Request's scheme (HTTP/HTTPS) 50 | */ 51 | ZEPHIR_DOC_METHOD(Owl_Http_RequestInterface, getScheme); 52 | 53 | /** 54 | * Get Request's method (GET, POST, PUT, DELETE, OPTIONS, HEAD, TRACE, CONNECT, PATCH, PROPFIND) 55 | */ 56 | ZEPHIR_DOC_METHOD(Owl_Http_RequestInterface, getMethod); 57 | 58 | -------------------------------------------------------------------------------- /ext/owl/http/requestinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_http_requestinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Http_RequestInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_http_requestinterface_getparam, 0, 0, 1) 7 | ZEND_ARG_INFO(0, key) 8 | ZEND_ARG_INFO(0, defaultValue) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_http_requestinterface_getpost, 0, 0, 1) 12 | ZEND_ARG_INFO(0, key) 13 | ZEND_ARG_INFO(0, defaultValue) 14 | ZEND_END_ARG_INFO() 15 | 16 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_http_requestinterface_getserver, 0, 0, 1) 17 | ZEND_ARG_INFO(0, key) 18 | ZEND_ARG_INFO(0, defaultValue) 19 | ZEND_END_ARG_INFO() 20 | 21 | ZEPHIR_INIT_FUNCS(owl_http_requestinterface_method_entry) { 22 | PHP_ABSTRACT_ME(Owl_Http_RequestInterface, getUri, NULL) 23 | PHP_ABSTRACT_ME(Owl_Http_RequestInterface, getPath, NULL) 24 | PHP_ABSTRACT_ME(Owl_Http_RequestInterface, getParam, arginfo_owl_http_requestinterface_getparam) 25 | PHP_ABSTRACT_ME(Owl_Http_RequestInterface, getPost, arginfo_owl_http_requestinterface_getpost) 26 | PHP_ABSTRACT_ME(Owl_Http_RequestInterface, getServer, arginfo_owl_http_requestinterface_getserver) 27 | PHP_ABSTRACT_ME(Owl_Http_RequestInterface, getScheme, NULL) 28 | PHP_ABSTRACT_ME(Owl_Http_RequestInterface, getMethod, NULL) 29 | PHP_FE_END 30 | }; 31 | -------------------------------------------------------------------------------- /ext/owl/http/response/json.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_http_response_json_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Http_Response_Json); 5 | 6 | PHP_METHOD(Owl_Http_Response_Json, __construct); 7 | PHP_METHOD(Owl_Http_Response_Json, setContent); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_http_response_json_setcontent, 0, 0, 1) 10 | ZEND_ARG_INFO(0, content) 11 | ZEND_END_ARG_INFO() 12 | 13 | ZEPHIR_INIT_FUNCS(owl_http_response_json_method_entry) { 14 | PHP_ME(Owl_Http_Response_Json, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 15 | PHP_ME(Owl_Http_Response_Json, setContent, arginfo_owl_http_response_json_setcontent, ZEND_ACC_PUBLIC) 16 | PHP_FE_END 17 | }; 18 | -------------------------------------------------------------------------------- /ext/owl/http/responseinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Http_ResponseInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Http, ResponseInterface, owl, http_responseinterface, owl_http_responseinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | ZEPHIR_DOC_METHOD(Owl_Http_ResponseInterface, send); 24 | 25 | ZEPHIR_DOC_METHOD(Owl_Http_ResponseInterface, getContent); 26 | 27 | ZEPHIR_DOC_METHOD(Owl_Http_ResponseInterface, setStatusCode); 28 | 29 | ZEPHIR_DOC_METHOD(Owl_Http_ResponseInterface, getStatusCode); 30 | 31 | -------------------------------------------------------------------------------- /ext/owl/http/responseinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_http_responseinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Http_ResponseInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_http_responseinterface_setstatuscode, 0, 0, 1) 7 | ZEND_ARG_INFO(0, code) 8 | ZEND_END_ARG_INFO() 9 | 10 | ZEPHIR_INIT_FUNCS(owl_http_responseinterface_method_entry) { 11 | PHP_ABSTRACT_ME(Owl_Http_ResponseInterface, send, NULL) 12 | PHP_ABSTRACT_ME(Owl_Http_ResponseInterface, getContent, NULL) 13 | PHP_ABSTRACT_ME(Owl_Http_ResponseInterface, setStatusCode, arginfo_owl_http_responseinterface_setstatuscode) 14 | PHP_ABSTRACT_ME(Owl_Http_ResponseInterface, getStatusCode, NULL) 15 | PHP_FE_END 16 | }; 17 | -------------------------------------------------------------------------------- /ext/owl/log/abstractformatter.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_abstractformatter_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_AbstractFormatter); 5 | 6 | PHP_METHOD(Owl_Log_AbstractFormatter, interpolate); 7 | PHP_METHOD(Owl_Log_AbstractFormatter, format); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_abstractformatter_interpolate, 0, 0, 1) 10 | ZEND_ARG_INFO(0, message) 11 | ZEND_ARG_ARRAY_INFO(0, context, 1) 12 | ZEND_END_ARG_INFO() 13 | 14 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_abstractformatter_format, 0, 0, 3) 15 | ZEND_ARG_INFO(0, level) 16 | ZEND_ARG_INFO(0, timestamp) 17 | ZEND_ARG_INFO(0, message) 18 | ZEND_ARG_ARRAY_INFO(0, context, 1) 19 | ZEND_END_ARG_INFO() 20 | 21 | ZEPHIR_INIT_FUNCS(owl_log_abstractformatter_method_entry) { 22 | PHP_ME(Owl_Log_AbstractFormatter, interpolate, arginfo_owl_log_abstractformatter_interpolate, ZEND_ACC_PROTECTED) 23 | PHP_ME(Owl_Log_AbstractFormatter, format, arginfo_owl_log_abstractformatter_format, ZEND_ACC_PUBLIC) 24 | PHP_FE_END 25 | }; 26 | -------------------------------------------------------------------------------- /ext/owl/log/exception/invalidformatterexception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_exceptions.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Owl_Log_Exception_InvalidFormatterException) { 19 | 20 | ZEPHIR_REGISTER_CLASS_EX(Owl\\Log\\Exception, InvalidFormatterException, owl, log_exception_invalidformatterexception, spl_ce_InvalidArgumentException, NULL, 0); 21 | 22 | return SUCCESS; 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /ext/owl/log/exception/invalidformatterexception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_exception_invalidformatterexception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_Exception_InvalidFormatterException); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/log/exception/invalidwriterexception.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "ext/spl/spl_exceptions.h" 16 | 17 | 18 | ZEPHIR_INIT_CLASS(Owl_Log_Exception_InvalidWriterException) { 19 | 20 | ZEPHIR_REGISTER_CLASS_EX(Owl\\Log\\Exception, InvalidWriterException, owl, log_exception_invalidwriterexception, spl_ce_InvalidArgumentException, NULL, 0); 21 | 22 | return SUCCESS; 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /ext/owl/log/exception/invalidwriterexception.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_exception_invalidwriterexception_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_Exception_InvalidWriterException); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/log/formatter/json.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_formatter_json_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_Formatter_Json); 5 | 6 | PHP_METHOD(Owl_Log_Formatter_Json, format); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_formatter_json_format, 0, 0, 1) 9 | ZEND_ARG_OBJ_INFO(0, record, Owl\\Log\\Record, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_log_formatter_json_method_entry) { 13 | PHP_ME(Owl_Log_Formatter_Json, format, arginfo_owl_log_formatter_json_format, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/log/formatter/line.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_formatter_line_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_Formatter_Line); 5 | 6 | PHP_METHOD(Owl_Log_Formatter_Line, format); 7 | 8 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_formatter_line_format, 0, 0, 1) 9 | ZEND_ARG_OBJ_INFO(0, record, Owl\\Log\\Record, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_log_formatter_line_method_entry) { 13 | PHP_ME(Owl_Log_Formatter_Line, format, arginfo_owl_log_formatter_line_format, ZEND_ACC_PUBLIC) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/log/formatterinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Log_FormatterInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Log, FormatterInterface, owl, log_formatterinterface, owl_log_formatterinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | /** 24 | * Format record 25 | */ 26 | ZEPHIR_DOC_METHOD(Owl_Log_FormatterInterface, format); 27 | 28 | -------------------------------------------------------------------------------- /ext/owl/log/formatterinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_formatterinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_FormatterInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_formatterinterface_format, 0, 0, 1) 7 | ZEND_ARG_OBJ_INFO(0, record, Owl\\Log\\Record, 0) 8 | ZEND_END_ARG_INFO() 9 | 10 | ZEPHIR_INIT_FUNCS(owl_log_formatterinterface_method_entry) { 11 | PHP_ABSTRACT_ME(Owl_Log_FormatterInterface, format, arginfo_owl_log_formatterinterface_format) 12 | PHP_FE_END 13 | }; 14 | -------------------------------------------------------------------------------- /ext/owl/log/record.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_record_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_Record); 5 | 6 | PHP_METHOD(Owl_Log_Record, interpolate); 7 | PHP_METHOD(Owl_Log_Record, __construct); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_record_interpolate, 0, 0, 1) 10 | ZEND_ARG_INFO(0, message) 11 | ZEND_ARG_ARRAY_INFO(0, context, 1) 12 | ZEND_END_ARG_INFO() 13 | 14 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_record___construct, 0, 0, 3) 15 | ZEND_ARG_INFO(0, level) 16 | ZEND_ARG_INFO(0, timestamp) 17 | ZEND_ARG_INFO(0, message) 18 | ZEND_ARG_ARRAY_INFO(0, context, 1) 19 | ZEND_END_ARG_INFO() 20 | 21 | ZEPHIR_INIT_FUNCS(owl_log_record_method_entry) { 22 | PHP_ME(Owl_Log_Record, interpolate, arginfo_owl_log_record_interpolate, ZEND_ACC_PROTECTED) 23 | PHP_ME(Owl_Log_Record, __construct, arginfo_owl_log_record___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 24 | PHP_FE_END 25 | }; 26 | -------------------------------------------------------------------------------- /ext/owl/log/writer/devnull.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_writer_devnull_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_Writer_DevNull); 5 | 6 | PHP_METHOD(Owl_Log_Writer_DevNull, write); 7 | static zend_object_value zephir_init_properties_Owl_Log_Writer_DevNull(zend_class_entry *class_type TSRMLS_DC); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_writer_devnull_write, 0, 0, 1) 10 | ZEND_ARG_INFO(0, record) 11 | ZEND_END_ARG_INFO() 12 | 13 | ZEPHIR_INIT_FUNCS(owl_log_writer_devnull_method_entry) { 14 | PHP_ME(Owl_Log_Writer_DevNull, write, arginfo_owl_log_writer_devnull_write, ZEND_ACC_PUBLIC) 15 | PHP_FE_END 16 | }; 17 | -------------------------------------------------------------------------------- /ext/owl/log/writer/echobrowser.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_writer_echobrowser_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_Writer_EchoBrowser); 5 | 6 | PHP_METHOD(Owl_Log_Writer_EchoBrowser, write); 7 | static zend_object_value zephir_init_properties_Owl_Log_Writer_EchoBrowser(zend_class_entry *class_type TSRMLS_DC); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_writer_echobrowser_write, 0, 0, 1) 10 | ZEND_ARG_INFO(0, record) 11 | ZEND_END_ARG_INFO() 12 | 13 | ZEPHIR_INIT_FUNCS(owl_log_writer_echobrowser_method_entry) { 14 | PHP_ME(Owl_Log_Writer_EchoBrowser, write, arginfo_owl_log_writer_echobrowser_write, ZEND_ACC_PUBLIC) 15 | PHP_FE_END 16 | }; 17 | -------------------------------------------------------------------------------- /ext/owl/log/writer/file.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_log_writer_file_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Log_Writer_File); 5 | 6 | PHP_METHOD(Owl_Log_Writer_File, write); 7 | static zend_object_value zephir_init_properties_Owl_Log_Writer_File(zend_class_entry *class_type TSRMLS_DC); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_log_writer_file_write, 0, 0, 1) 10 | ZEND_ARG_INFO(0, record) 11 | ZEND_END_ARG_INFO() 12 | 13 | ZEPHIR_INIT_FUNCS(owl_log_writer_file_method_entry) { 14 | PHP_ME(Owl_Log_Writer_File, write, arginfo_owl_log_writer_file_write, ZEND_ACC_PUBLIC) 15 | PHP_FE_END 16 | }; 17 | -------------------------------------------------------------------------------- /ext/owl/module/manager.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Owl_Module_Manager) { 18 | 19 | ZEPHIR_REGISTER_CLASS(Owl\\Module, Manager, owl, module_manager, NULL, 0); 20 | 21 | return SUCCESS; 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/owl/module/manager.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_module_manager_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Module_Manager); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/mvc/controller.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_mvc_controller_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Mvc_Controller); 5 | 6 | PHP_METHOD(Owl_Mvc_Controller, getRequest); 7 | PHP_METHOD(Owl_Mvc_Controller, getResponse); 8 | PHP_METHOD(Owl_Mvc_Controller, getDi); 9 | PHP_METHOD(Owl_Mvc_Controller, __construct); 10 | 11 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_mvc_controller___construct, 0, 0, 3) 12 | ZEND_ARG_OBJ_INFO(0, request, Owl\\Http\\Request, 0) 13 | ZEND_ARG_OBJ_INFO(0, response, Owl\\Http\\Response, 0) 14 | ZEND_ARG_OBJ_INFO(0, di, Owl\\Di\\ContainerInterface, 0) 15 | ZEND_END_ARG_INFO() 16 | 17 | ZEPHIR_INIT_FUNCS(owl_mvc_controller_method_entry) { 18 | PHP_ME(Owl_Mvc_Controller, getRequest, NULL, ZEND_ACC_PUBLIC) 19 | PHP_ME(Owl_Mvc_Controller, getResponse, NULL, ZEND_ACC_PUBLIC) 20 | PHP_ME(Owl_Mvc_Controller, getDi, NULL, ZEND_ACC_PUBLIC) 21 | PHP_ME(Owl_Mvc_Controller, __construct, arginfo_owl_mvc_controller___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 22 | PHP_FE_END 23 | }; 24 | -------------------------------------------------------------------------------- /ext/owl/mvc/controllerinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Mvc_ControllerInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Mvc, ControllerInterface, owl, mvc_controllerinterface, owl_mvc_controllerinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | ZEPHIR_DOC_METHOD(Owl_Mvc_ControllerInterface, __construct); 24 | 25 | -------------------------------------------------------------------------------- /ext/owl/mvc/controllerinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_mvc_controllerinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Mvc_ControllerInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_mvc_controllerinterface___construct, 0, 0, 3) 7 | ZEND_ARG_OBJ_INFO(0, request, Owl\\Http\\Request, 0) 8 | ZEND_ARG_OBJ_INFO(0, response, Owl\\Http\\Response, 0) 9 | ZEND_ARG_OBJ_INFO(0, di, Owl\\Di\\ContainerInterface, 0) 10 | ZEND_END_ARG_INFO() 11 | 12 | ZEPHIR_INIT_FUNCS(owl_mvc_controllerinterface_method_entry) { 13 | PHP_ABSTRACT_ME(Owl_Mvc_ControllerInterface, __construct, arginfo_owl_mvc_controllerinterface___construct) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/mvc/view.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_mvc_view_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Mvc_View); 5 | 6 | PHP_METHOD(Owl_Mvc_View, getPath); 7 | PHP_METHOD(Owl_Mvc_View, setPath); 8 | PHP_METHOD(Owl_Mvc_View, render); 9 | 10 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_mvc_view_setpath, 0, 0, 1) 11 | ZEND_ARG_INFO(0, path) 12 | ZEND_END_ARG_INFO() 13 | 14 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_mvc_view_render, 0, 0, 1) 15 | ZEND_ARG_INFO(0, path) 16 | ZEND_ARG_ARRAY_INFO(0, parameters, 1) 17 | ZEND_END_ARG_INFO() 18 | 19 | ZEPHIR_INIT_FUNCS(owl_mvc_view_method_entry) { 20 | PHP_ME(Owl_Mvc_View, getPath, NULL, ZEND_ACC_PUBLIC) 21 | PHP_ME(Owl_Mvc_View, setPath, arginfo_owl_mvc_view_setpath, ZEND_ACC_PUBLIC) 22 | PHP_ME(Owl_Mvc_View, render, arginfo_owl_mvc_view_render, ZEND_ACC_PUBLIC) 23 | PHP_FE_END 24 | }; 25 | -------------------------------------------------------------------------------- /ext/owl/mvc/view/engine/php.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../../php_ext.h" 8 | #include "../../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Owl_Mvc_View_Engine_Php) { 18 | 19 | ZEPHIR_REGISTER_CLASS(Owl\\Mvc\\View\\Engine, Php, owl, mvc_view_engine_php, NULL, 0); 20 | 21 | return SUCCESS; 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ext/owl/mvc/view/engine/php.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_mvc_view_engine_php_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Mvc_View_Engine_Php); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/mvc/viewinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Mvc_ViewInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Mvc, ViewInterface, owl, mvc_viewinterface, owl_mvc_viewinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | ZEPHIR_DOC_METHOD(Owl_Mvc_ViewInterface, getPath); 24 | 25 | /** 26 | * Render view 27 | */ 28 | ZEPHIR_DOC_METHOD(Owl_Mvc_ViewInterface, render); 29 | 30 | -------------------------------------------------------------------------------- /ext/owl/mvc/viewinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_mvc_viewinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Mvc_ViewInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_mvc_viewinterface_render, 0, 0, 1) 7 | ZEND_ARG_INFO(0, path) 8 | ZEND_ARG_ARRAY_INFO(0, parameters, 1) 9 | ZEND_END_ARG_INFO() 10 | 11 | ZEPHIR_INIT_FUNCS(owl_mvc_viewinterface_method_entry) { 12 | PHP_ABSTRACT_ME(Owl_Mvc_ViewInterface, getPath, NULL) 13 | PHP_ABSTRACT_ME(Owl_Mvc_ViewInterface, render, arginfo_owl_mvc_viewinterface_render) 14 | PHP_FE_END 15 | }; 16 | -------------------------------------------------------------------------------- /ext/owl/router/http/dynamicroute.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_router_http_dynamicroute_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Router_Http_DynamicRoute); 5 | 6 | PHP_METHOD(Owl_Router_Http_DynamicRoute, __construct); 7 | PHP_METHOD(Owl_Router_Http_DynamicRoute, getPattern); 8 | PHP_METHOD(Owl_Router_Http_DynamicRoute, match); 9 | 10 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_router_http_dynamicroute___construct, 0, 0, 1) 11 | ZEND_ARG_INFO(0, uri) 12 | ZEND_END_ARG_INFO() 13 | 14 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_router_http_dynamicroute_match, 0, 0, 1) 15 | ZEND_ARG_INFO(0, uri) 16 | ZEND_END_ARG_INFO() 17 | 18 | ZEPHIR_INIT_FUNCS(owl_router_http_dynamicroute_method_entry) { 19 | PHP_ME(Owl_Router_Http_DynamicRoute, __construct, arginfo_owl_router_http_dynamicroute___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 20 | PHP_ME(Owl_Router_Http_DynamicRoute, getPattern, NULL, ZEND_ACC_PUBLIC) 21 | PHP_ME(Owl_Router_Http_DynamicRoute, match, arginfo_owl_router_http_dynamicroute_match, ZEND_ACC_PUBLIC) 22 | PHP_FE_END 23 | }; 24 | -------------------------------------------------------------------------------- /ext/owl/router/http/staticroute.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../../php_ext.h" 8 | #include "../../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | #include "kernel/object.h" 16 | #include "kernel/operators.h" 17 | #include "kernel/memory.h" 18 | 19 | 20 | ZEPHIR_INIT_CLASS(Owl_Router_Http_StaticRoute) { 21 | 22 | ZEPHIR_REGISTER_CLASS_EX(Owl\\Router\\Http, StaticRoute, owl, router_http_staticroute, owl_router_route_ce, owl_router_http_staticroute_method_entry, 0); 23 | 24 | return SUCCESS; 25 | 26 | } 27 | 28 | PHP_METHOD(Owl_Router_Http_StaticRoute, __construct) { 29 | 30 | zval *uri_param = NULL; 31 | zval *uri = NULL; 32 | 33 | ZEPHIR_MM_GROW(); 34 | zephir_fetch_params(1, 1, 0, &uri_param); 35 | 36 | zephir_get_strval(uri, uri_param); 37 | 38 | 39 | zephir_update_property_this(this_ptr, SL("uri"), uri TSRMLS_CC); 40 | ZEPHIR_MM_RESTORE(); 41 | 42 | } 43 | 44 | PHP_METHOD(Owl_Router_Http_StaticRoute, match) { 45 | 46 | zval *uri_param = NULL, *_0; 47 | zval *uri = NULL; 48 | 49 | ZEPHIR_MM_GROW(); 50 | zephir_fetch_params(1, 1, 0, &uri_param); 51 | 52 | zephir_get_strval(uri, uri_param); 53 | 54 | 55 | _0 = zephir_fetch_nproperty_this(this_ptr, SL("uri"), PH_NOISY_CC); 56 | RETURN_MM_BOOL(ZEPHIR_IS_EQUAL(_0, uri)); 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /ext/owl/router/http/staticroute.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_router_http_staticroute_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Router_Http_StaticRoute); 5 | 6 | PHP_METHOD(Owl_Router_Http_StaticRoute, __construct); 7 | PHP_METHOD(Owl_Router_Http_StaticRoute, match); 8 | 9 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_router_http_staticroute___construct, 0, 0, 1) 10 | ZEND_ARG_INFO(0, uri) 11 | ZEND_END_ARG_INFO() 12 | 13 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_router_http_staticroute_match, 0, 0, 1) 14 | ZEND_ARG_INFO(0, uri) 15 | ZEND_END_ARG_INFO() 16 | 17 | ZEPHIR_INIT_FUNCS(owl_router_http_staticroute_method_entry) { 18 | PHP_ME(Owl_Router_Http_StaticRoute, __construct, arginfo_owl_router_http_staticroute___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) 19 | PHP_ME(Owl_Router_Http_StaticRoute, match, arginfo_owl_router_http_staticroute_match, ZEND_ACC_PUBLIC) 20 | PHP_FE_END 21 | }; 22 | -------------------------------------------------------------------------------- /ext/owl/router/route.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "kernel/main.h" 15 | 16 | 17 | ZEPHIR_INIT_CLASS(Owl_Router_Route) { 18 | 19 | ZEPHIR_REGISTER_CLASS(Owl\\Router, Route, owl, router_route, NULL, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); 20 | 21 | zend_declare_property_null(owl_router_route_ce, SL("uri"), ZEND_ACC_PUBLIC TSRMLS_CC); 22 | 23 | zend_declare_property_long(owl_router_route_ce, SL("method"), 7, ZEND_ACC_PUBLIC TSRMLS_CC); 24 | 25 | zend_declare_property_null(owl_router_route_ce, SL("parameters"), ZEND_ACC_PUBLIC TSRMLS_CC); 26 | 27 | zend_declare_class_constant_long(owl_router_route_ce, SL("GET"), 1 TSRMLS_CC); 28 | 29 | zend_declare_class_constant_long(owl_router_route_ce, SL("POST"), 2 TSRMLS_CC); 30 | 31 | zend_declare_class_constant_long(owl_router_route_ce, SL("DELETE"), 3 TSRMLS_CC); 32 | 33 | zend_declare_class_constant_long(owl_router_route_ce, SL("PUT"), 4 TSRMLS_CC); 34 | 35 | zend_declare_class_constant_long(owl_router_route_ce, SL("ALL"), 7 TSRMLS_CC); 36 | 37 | return SUCCESS; 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /ext/owl/router/route.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_router_route_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Router_Route); 5 | 6 | -------------------------------------------------------------------------------- /ext/owl/router/routerinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Router_RouterInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Router, RouterInterface, owl, router_routerinterface, owl_router_routerinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | ZEPHIR_DOC_METHOD(Owl_Router_RouterInterface, matchRequest); 24 | 25 | ZEPHIR_DOC_METHOD(Owl_Router_RouterInterface, match); 26 | 27 | -------------------------------------------------------------------------------- /ext/owl/router/routerinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_router_routerinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Router_RouterInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_router_routerinterface_matchrequest, 0, 0, 1) 7 | ZEND_ARG_OBJ_INFO(0, request, Owl\\Http\\RequestInterface, 0) 8 | ZEND_END_ARG_INFO() 9 | 10 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_router_routerinterface_match, 0, 0, 1) 11 | ZEND_ARG_INFO(0, uri) 12 | ZEND_ARG_INFO(0, method) 13 | ZEND_END_ARG_INFO() 14 | 15 | ZEPHIR_INIT_FUNCS(owl_router_routerinterface_method_entry) { 16 | PHP_ABSTRACT_ME(Owl_Router_RouterInterface, matchRequest, arginfo_owl_router_routerinterface_matchrequest) 17 | PHP_ABSTRACT_ME(Owl_Router_RouterInterface, match, arginfo_owl_router_routerinterface_match) 18 | PHP_FE_END 19 | }; 20 | -------------------------------------------------------------------------------- /ext/owl/session/managerinterface.zep.c: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_CONFIG_H 3 | #include "../../ext_config.h" 4 | #endif 5 | 6 | #include 7 | #include "../../php_ext.h" 8 | #include "../../ext.h" 9 | 10 | #include 11 | 12 | #include "kernel/main.h" 13 | 14 | 15 | ZEPHIR_INIT_CLASS(Owl_Session_ManagerInterface) { 16 | 17 | ZEPHIR_REGISTER_INTERFACE(Owl\\Session, ManagerInterface, owl, session_managerinterface, owl_session_managerinterface_method_entry); 18 | 19 | return SUCCESS; 20 | 21 | } 22 | 23 | ZEPHIR_DOC_METHOD(Owl_Session_ManagerInterface, start); 24 | 25 | ZEPHIR_DOC_METHOD(Owl_Session_ManagerInterface, getId); 26 | 27 | ZEPHIR_DOC_METHOD(Owl_Session_ManagerInterface, rememberMe); 28 | 29 | ZEPHIR_DOC_METHOD(Owl_Session_ManagerInterface, forgetMe); 30 | 31 | -------------------------------------------------------------------------------- /ext/owl/session/managerinterface.zep.h: -------------------------------------------------------------------------------- 1 | 2 | extern zend_class_entry *owl_session_managerinterface_ce; 3 | 4 | ZEPHIR_INIT_CLASS(Owl_Session_ManagerInterface); 5 | 6 | ZEND_BEGIN_ARG_INFO_EX(arginfo_owl_session_managerinterface_rememberme, 0, 0, 1) 7 | ZEND_ARG_INFO(0, ttl) 8 | ZEND_END_ARG_INFO() 9 | 10 | ZEPHIR_INIT_FUNCS(owl_session_managerinterface_method_entry) { 11 | PHP_ABSTRACT_ME(Owl_Session_ManagerInterface, start, NULL) 12 | PHP_ABSTRACT_ME(Owl_Session_ManagerInterface, getId, NULL) 13 | PHP_ABSTRACT_ME(Owl_Session_ManagerInterface, rememberMe, arginfo_owl_session_managerinterface_rememberme) 14 | PHP_ABSTRACT_ME(Owl_Session_ManagerInterface, forgetMe, NULL) 15 | PHP_FE_END 16 | }; 17 | -------------------------------------------------------------------------------- /ext/pgo-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export CC="gcc" 3 | export CFLAGS="-O2 -Wall -fvisibility=hidden -fno-delete-null-pointer-checks -finline-functions -fno-builtin-memcmp -flto -DZEPHIR_RELEASE=1 -fprofile-generate -lgcov -pg" 4 | if [ -f Makefile ]; then 5 | sudo make --silent clean 6 | sudo phpize --silent --clean 7 | fi 8 | phpize --silent 9 | ./configure --silent --enable-owl 10 | make --silent && sudo make --silent install 11 | -------------------------------------------------------------------------------- /ext/pgo-use-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export CC="gcc" 3 | export CFLAGS="-O2 -Wall -fvisibility=hidden -fno-delete-null-pointer-checks -finline-functions -fno-builtin-memcmp -flto -DZEPHIR_RELEASE=1 -fprofile-use" 4 | 5 | if [ -f .libs/owl.gcda ]; then 6 | cp .libs/owl.gcda . 7 | else 8 | echo "Profile info was not found" 9 | fi 10 | 11 | if [ -f Makefile ]; then 12 | sudo make --silent clean 13 | sudo phpize --silent --clean 14 | fi 15 | 16 | phpize --silent 17 | ./configure --silent --enable-owl 18 | make --silent && sudo make --silent install 19 | -------------------------------------------------------------------------------- /ext/php_ext.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by Zephir do not modify it! */ 3 | 4 | #include "php_owl.h" -------------------------------------------------------------------------------- /ide/Owl/ApplicationInterface.zep.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | class Memcache extends \Owl\Cache\Driver\CacheDriver 9 | { 10 | 11 | protected $options; 12 | 13 | /** 14 | * @var \Memcache 15 | */ 16 | protected $instance; 17 | 18 | 19 | /** 20 | * @param array $options 21 | */ 22 | public function __construct($options = null) {} 23 | 24 | /** 25 | * @param mixed $instance 26 | */ 27 | public function setInstance(\Memcache $instance) {} 28 | 29 | /** 30 | * @return \Memcache 31 | */ 32 | public function getInstance() {} 33 | 34 | 35 | public function __destruct() {} 36 | 37 | /** 38 | * {@inheritDoc} 39 | * 40 | * @param mixed $id 41 | * @param mixed $data 42 | * @param mixed $lifeTime 43 | */ 44 | public function save($id, $data, $lifeTime = 3600) {} 45 | 46 | /** 47 | * {@inheritDoc} 48 | * 49 | * @param mixed $id 50 | */ 51 | public function delete($id) {} 52 | 53 | /** 54 | * {@inheritDoc} 55 | * 56 | * @param mixed $id 57 | */ 58 | public function get($id) {} 59 | 60 | /** 61 | * {@inheritDoc} 62 | */ 63 | public function flush() {} 64 | 65 | } 66 | -------------------------------------------------------------------------------- /ide/Owl/cache/driver/Memcached.zep.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | class Memcached extends \Owl\Cache\Driver\CacheDriver 9 | { 10 | 11 | protected $options; 12 | 13 | /** 14 | * @var \Memcached 15 | */ 16 | protected $instance; 17 | 18 | 19 | /** 20 | * @param array $options 21 | */ 22 | public function __construct($options = null) {} 23 | 24 | /** 25 | * @param mixed $instance 26 | */ 27 | public function setInstance(\Memcached $instance) {} 28 | 29 | /** 30 | * @return \Memcached 31 | */ 32 | public function getInstance() {} 33 | 34 | 35 | public function __destruct() {} 36 | 37 | /** 38 | * {@inheritDoc} 39 | * 40 | * @param mixed $id 41 | * @param mixed $data 42 | * @param mixed $lifeTime 43 | */ 44 | public function save($id, $data, $lifeTime = 3600) {} 45 | 46 | /** 47 | * {@inheritDoc} 48 | * 49 | * @param mixed $id 50 | */ 51 | public function delete($id) {} 52 | 53 | /** 54 | * {@inheritDoc} 55 | * 56 | * @param mixed $id 57 | */ 58 | public function get($id) {} 59 | 60 | /** 61 | * {@inheritDoc} 62 | */ 63 | public function flush() {} 64 | 65 | } 66 | -------------------------------------------------------------------------------- /ide/Owl/cache/driver/NativeArray.zep.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | class Redis extends \Owl\Cache\Driver\CacheDriver 9 | { 10 | 11 | protected $options; 12 | 13 | /** 14 | * @var \Redis 15 | */ 16 | protected $instance; 17 | 18 | 19 | /** 20 | * @param array $options 21 | */ 22 | public function __construct($options = null) {} 23 | 24 | /** 25 | * @param mixed $instance 26 | */ 27 | public function setInstance(\Redis $instance) {} 28 | 29 | /** 30 | * @return \Redis 31 | */ 32 | public function getInstance() {} 33 | 34 | 35 | public function __destruct() {} 36 | 37 | /** 38 | * {@inheritDoc} 39 | * 40 | * @param mixed $id 41 | * @param mixed $data 42 | * @param mixed $lifeTime 43 | */ 44 | public function save($id, $data, $lifeTime = 3600) {} 45 | 46 | /** 47 | * {@inheritDoc} 48 | * 49 | * @param mixed $id 50 | */ 51 | public function delete($id) {} 52 | 53 | /** 54 | * {@inheritDoc} 55 | * 56 | * @param mixed $id 57 | */ 58 | public function get($id) {} 59 | 60 | /** 61 | * {@inheritDoc} 62 | */ 63 | public function flush() {} 64 | 65 | } 66 | -------------------------------------------------------------------------------- /ide/Owl/console/Application.zep.php: -------------------------------------------------------------------------------- 1 | annotations = annotations; 13 | let this->methods = methods; 14 | } 15 | } -------------------------------------------------------------------------------- /owl/Annotations/Exception.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Annotations; 3 | 4 | class Exception extends \Owl\Exception 5 | { 6 | 7 | } -------------------------------------------------------------------------------- /owl/Annotations/Reader.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Annotations; 3 | 4 | class Reader 5 | { 6 | static public function parse(string comment) 7 | { 8 | return parse_annotations(comment, 1, 2); 9 | } 10 | } -------------------------------------------------------------------------------- /owl/ApplicationInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl; 3 | 4 | use Owl\Di\ContainerInterface; 5 | 6 | use Owl\Http\Request; 7 | use Owl\Http\RequestInterface; 8 | use Owl\Http\Response; 9 | use Owl\Http\ResponseInterface; 10 | 11 | use Owl\Router\Http\StaticRoute; 12 | 13 | interface ApplicationInterface 14 | { 15 | const ENV_PRODUCTION = "production"; 16 | const ENV_DEVELOPMENT = "development"; 17 | 18 | const EVENT_BEFORE_HANDLE = "app:beforeHandle"; 19 | const EVENT_AFTER_HANDLE = "app:afterHandle"; 20 | 21 | 22 | public fn __construct( di = null, eventManager = null, string env = self::ENV_PRODUCTION); 23 | 24 | /** 25 | * Handle Http Request 26 | */ 27 | public fn handle( request, response = null) -> ; 28 | 29 | /** 30 | * Sets the default namespace 31 | */ 32 | public function setDefaultNamespace(string namespaceName); 33 | } 34 | -------------------------------------------------------------------------------- /owl/Bridge/Lynx/Rest/EntityController.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Bridge\Lynx\Rest; 3 | 4 | class EntityController extends \Owl\Mvc\Controller 5 | { 6 | public function getAction() 7 | { 8 | 9 | } 10 | 11 | public function deleteAction() 12 | { 13 | 14 | } 15 | 16 | public function createAction() 17 | { 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /owl/Cache/Driver.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Cache; 3 | 4 | interface Driver 5 | { 6 | /** 7 | * To initialize cache provider 8 | * 9 | * @return mixed 10 | */ 11 | public fn getInstance(); 12 | 13 | /** 14 | * Save data 15 | * 16 | * @param $id 17 | * @param $data 18 | * @param int $lifeTime 19 | * @return boolean 20 | */ 21 | public fn save(string! id, var data, int! lifeTime = 3600); 22 | 23 | /** 24 | * Save data by id 25 | * 26 | * @param $id 27 | * @return boolean 28 | */ 29 | public fn delete(string! id); 30 | 31 | /** 32 | * Fetch data by id 33 | * 34 | * @param $id 35 | * @return mixed 36 | */ 37 | public fn get(string! id); 38 | 39 | /** 40 | * Is value exist? 41 | * 42 | * @param $id 43 | * @return boolean 44 | */ 45 | public fn exists(string! id); 46 | 47 | /** 48 | * Flush all values 49 | * 50 | * @return boolean 51 | */ 52 | public fn flush(); 53 | } 54 | -------------------------------------------------------------------------------- /owl/Cache/Driver/CacheDriver.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Cache\Driver; 3 | 4 | use Owl\Cache\Driver; 5 | 6 | abstract class CacheDriver implements Driver 7 | { 8 | public function exists(string! id) 9 | { 10 | return this->get(id) !== false; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /owl/Console/Application.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Console; 3 | 4 | class Application 5 | { 6 | protected commands { 7 | get 8 | }; 9 | 10 | public function addCommand( command) 11 | { 12 | let this->commands[] = command; 13 | } 14 | 15 | public function addCommands(array! commands) 16 | { 17 | var command; 18 | 19 | for command in commands { 20 | this->addCommand(command); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /owl/Console/CommandInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Console; 3 | 4 | interface CommandInterface 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /owl/DBAL/Driver/DriverInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\DBAL\Driver; 3 | 4 | use PdoStatement; 5 | use Owl\DBAL\Platform\PlatformInterface; 6 | 7 | interface DriverInterface 8 | { 9 | public function isConnected() -> boolean; 10 | 11 | public function getNewPlatform() -> ; 12 | 13 | public function lastInsertId(); 14 | 15 | public function prepare(var statement) -> ; 16 | } 17 | -------------------------------------------------------------------------------- /owl/DBAL/Driver/MySql.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\DBAL\Driver; 3 | 4 | use PdoStatement; 5 | use Owl\DBAL\Platform\PlatformInterface; 6 | 7 | class MySQL extends AbstractPdo implements DriverInterface 8 | { 9 | public function getNewPlatform() -> 10 | { 11 | return new \Owl\DBAL\Platform\MySQL(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /owl/DBAL/Driver/Pdo.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\DBAL\Driver; 3 | 4 | class Pdo extends \PDO 5 | { 6 | const PARAM_EXPRESSION = 10; 7 | 8 | public function __construct(string! dsn, var username = null, var password = null, array options = null) 9 | { 10 | parent::__construct(dsn, username, password, options); 11 | this->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); 12 | this->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /owl/DBAL/Driver/PgSql.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\DBAL\Driver; 3 | 4 | use PdoStatement; 5 | use Owl\DBAL\Platform\PlatformInterface; 6 | 7 | class PgSQL extends AbstractPdo implements DriverInterface 8 | { 9 | public function getNewPlatform() -> 10 | { 11 | return new \Owl\DBAL\Platform\PgSQL(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /owl/DBAL/Exception.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\DBAL; 3 | 4 | class Exception extends \Owl\Exception 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /owl/DBAL/Platform/MySQL.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\DBAL\Platform; 3 | 4 | class MySQL implements PlatformInterface 5 | { 6 | inline public function wrap(string id) 7 | { 8 | return "`" . id . "`"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /owl/DBAL/Platform/PgSQL.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\DBAL\Platform; 3 | 4 | class PgSQL implements PlatformInterface 5 | { 6 | inline public function wrap(string id) 7 | { 8 | return id; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /owl/DBAL/Platform/PlatformInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\DBAL\Platform; 3 | 4 | interface PlatformInterface 5 | { 6 | inline public function wrap(string id); 7 | } 8 | -------------------------------------------------------------------------------- /owl/Di/ContainerInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Di; 3 | 4 | interface ContainerInterface 5 | { 6 | public fn setService(string! name, var definition) -> void; 7 | 8 | public fn set(string! name, var definition) -> void; 9 | 10 | public fn has(string! name) -> boolean; 11 | 12 | public fn get(string! name) -> object; 13 | 14 | public fn getService(string! name) -> object; 15 | } 16 | -------------------------------------------------------------------------------- /owl/Di/ServiceDefinition.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Di; 3 | 4 | class ServiceDefinition implements ServiceDefinitionInterface 5 | { 6 | /** 7 | * @var string 8 | */ 9 | protected name { 10 | get 11 | }; 12 | 13 | /** 14 | * @var object|callable 15 | */ 16 | protected definition { 17 | get 18 | }; 19 | 20 | /** 21 | * @var boolean 22 | */ 23 | protected shared = false { 24 | get 25 | }; 26 | 27 | /** 28 | * @var boolean 29 | */ 30 | protected resolved = false { 31 | get 32 | }; 33 | 34 | /** 35 | * Phalcon\Di\Service 36 | * 37 | * @param string name 38 | * @param mixed definition 39 | * @param boolean shared 40 | */ 41 | public final function __construct(string! name, definition, boolean shared = false) 42 | { 43 | let this->name = name, 44 | this->definition = definition, 45 | this->shared = shared; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /owl/Di/ServiceDefinitionInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Di; 3 | 4 | interface ServiceDefinitionInterface 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /owl/DispatcherInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl; 3 | 4 | interface DispatcherInterface 5 | { 6 | const EVENT_ROUTER_BEFORE_EXECUTE = "dispatch:beforeExecuteRoute"; 7 | const EVENT_ROUTER_AFTER_EXECUTE = "dispatch:afterExecuteRoute"; 8 | 9 | const EVENT_AFTER_ACTION = "dispatch:afterAction"; 10 | const EVENT_AFTER_INIT = "dispatch:afterInitialize"; 11 | 12 | inline public fn dispatch(var parameters, var callParameters = null, var response); 13 | } 14 | -------------------------------------------------------------------------------- /owl/Event/Event.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Event; 3 | 4 | class Event 5 | { 6 | protected name {get}; 7 | 8 | protected data {get}; 9 | 10 | public function __construct(name, data) 11 | { 12 | let this->name = name; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /owl/Event/Manager.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Event; 3 | 4 | class Manager 5 | { 6 | protected listeners = []; 7 | 8 | public fn listen(var eventName, callable! callback) 9 | { 10 | let this->listeners[eventName][] = callback; 11 | } 12 | 13 | public function emit(string eventName, var data = null) 14 | { 15 | var events, callback; 16 | 17 | if fetch events, this->listeners[eventName] { 18 | for callback in events { 19 | if typeof callback == "array" { 20 | call_user_func_array(callback, [new Event(eventName, data)]); 21 | } else { 22 | /** 23 | * It's a hack, to call by zval 24 | */ 25 | {callback}(new Event(eventName, data)); 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /owl/Exception.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl; 3 | 4 | class Exception extends \Exception 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /owl/Filter/AbstractFilter.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Filter; 3 | 4 | abstract class AbstractFilter implements FilterInterface 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /owl/Filter/Email.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Filter; 3 | 4 | class Email extends AbstractFilter 5 | { 6 | public fn filter(var value) -> var 7 | { 8 | return filter_var(value, FILTER_SANITIZE_EMAIL); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /owl/Filter/FilterInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Filter; 3 | 4 | interface FilterInterface 5 | { 6 | /** 7 | * Returns the result of filtering $value 8 | */ 9 | public function filter(var value) -> var; 10 | } 11 | -------------------------------------------------------------------------------- /owl/Filter/StripTags.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Filter; 3 | 4 | class StripTags extends AbstractFilter 5 | { 6 | public fn filter(var value) -> var 7 | { 8 | return strip_tags(value); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /owl/Filter/Trim.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Filter; 3 | 4 | class Trim extends AbstractFilter 5 | { 6 | public fn filter(var value) -> var 7 | { 8 | return trim(value); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /owl/Filter/Url.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Filter; 3 | 4 | class Url extends AbstractFilter 5 | { 6 | public fn filter(var value) -> var 7 | { 8 | return filter_var(value, FILTER_SANITIZE_URL); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /owl/Http/HeadersBag.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Http; 3 | 4 | use Owl\Std\ArrayBag; 5 | 6 | class HeadersBag extends ArrayBag 7 | { 8 | public fn send() 9 | { 10 | var header, value; 11 | 12 | for header, value in this->elements { 13 | if !empty value { 14 | header(header . ": " . value, true); 15 | } else { 16 | header(header, true); 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /owl/Http/RequestInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Http; 3 | 4 | interface RequestInterface 5 | { 6 | /** 7 | * Get Request's URI 8 | */ 9 | public function getUri() -> string; 10 | 11 | /** 12 | * Get Request's path (URI without GET parameters) 13 | */ 14 | public function getPath() -> string; 15 | 16 | /** 17 | * Get parameter from $_GET 18 | */ 19 | public fn getParam(string! key, var defaultValue = null); 20 | 21 | /** 22 | * Get parameter from $_POST 23 | */ 24 | public fn getPost(string! key, var defaultValue = null); 25 | 26 | /** 27 | * Get parameter from $_SERVER 28 | */ 29 | public fn getServer(string! key, var defaultValue = null); 30 | 31 | /** 32 | * Get Request's scheme (HTTP/HTTPS) 33 | */ 34 | public fn getScheme() -> string; 35 | 36 | /** 37 | * Get Request's method (GET, POST, PUT, DELETE, OPTIONS, HEAD, TRACE, CONNECT, PATCH, PROPFIND) 38 | */ 39 | public fn getMethod() -> string; 40 | } 41 | -------------------------------------------------------------------------------- /owl/Http/Response/Json.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Http\Response; 3 | 4 | use Owl\Http\Response; 5 | use Owl\Http\HeadersBag; 6 | 7 | class Json extends Response 8 | { 9 | public function __construct() 10 | { 11 | let this->headers = new HeadersBag([ 12 | "Content-Type": "application/json" 13 | ]); 14 | } 15 | 16 | public function setContent(var content) 17 | { 18 | let this->content = json_encode(content); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /owl/Http/ResponseInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Http; 3 | 4 | interface ResponseInterface 5 | { 6 | public function send() -> boolean; 7 | 8 | public function getContent() -> string; 9 | 10 | public function setStatusCode(int code); 11 | 12 | public function getStatusCode() -> int; 13 | } 14 | -------------------------------------------------------------------------------- /owl/Log/Exception/InvalidFormatterException.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log\Exception; 3 | 4 | class InvalidFormatterException extends \InvalidArgumentException 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /owl/Log/Exception/InvalidWriterException.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log\Exception; 3 | 4 | class InvalidWriterException extends \InvalidArgumentException 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /owl/Log/Formatter/Json.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log\Formatter; 3 | 4 | use Owl\Log\Logger; 5 | use Owl\Log\Record; 6 | use Owl\Log\FormatterInterface; 7 | 8 | class Json implements FormatterInterface 9 | { 10 | /** 11 | * @inheritdoc 12 | */ 13 | public function format( record) -> string 14 | { 15 | return json_encode([ 16 | "type": Logger::getLevelTitle(record->level), 17 | "message": record->message, 18 | "timestamp": record->timestamp 19 | ]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /owl/Log/Formatter/Line.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log\Formatter; 3 | 4 | use Owl\Log\Logger; 5 | use Owl\Log\Record; 6 | use Owl\Log\FormatterInterface; 7 | 8 | class Line implements FormatterInterface 9 | { 10 | /** 11 | * @inheritdoc 12 | */ 13 | public function format( record) -> string 14 | { 15 | return Logger::getLevelTitle(record->level).":" . date(DATE_RFC2822, record->timestamp) . ":". record->message; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /owl/Log/FormatterInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log; 3 | 4 | interface FormatterInterface 5 | { 6 | /** 7 | * Format record 8 | */ 9 | public function format( record) -> string; 10 | } 11 | -------------------------------------------------------------------------------- /owl/Log/Record.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log; 3 | 4 | class Record 5 | { 6 | /** 7 | * Record level 8 | */ 9 | public level; 10 | 11 | /** 12 | * Record timestamp 13 | */ 14 | public timestamp; 15 | 16 | /** 17 | * Record message 18 | */ 19 | public message; 20 | 21 | /** 22 | * Interpolates context values into the message placeholders. 23 | * 24 | * @see http://www.php-fig.org/psr/psr-3/ 25 | */ 26 | protected function interpolate(string message, array context = []) 27 | { 28 | var replace, key, value; 29 | 30 | if count(context) > 0 { 31 | let replace = []; 32 | for key, value in context { 33 | let replace["{" . key . "}"] = value; 34 | } 35 | return strtr(message, replace); 36 | } 37 | return message; 38 | } 39 | 40 | /** 41 | * Create and interpolate record message 42 | */ 43 | public function __construct(var level, float timestamp, string message, array context = []) 44 | { 45 | let message = this->interpolate(message, context); 46 | 47 | let this->level = level; 48 | let this->timestamp = timestamp; 49 | let this->message = message; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /owl/Log/Writer/DevNull.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log\Writer; 3 | 4 | use Owl\Log\AbstractWriter; 5 | 6 | /** 7 | * Special writer for testing 8 | */ 9 | class DevNull extends AbstractWriter 10 | { 11 | /** 12 | * @inheritdoc 13 | */ 14 | public function write(string record) 15 | { 16 | return null; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /owl/Log/Writer/EchoBrowser.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log\Writer; 3 | 4 | use Owl\Log\AbstractWriter; 5 | 6 | class EchoBrowser extends AbstractWriter 7 | { 8 | /** 9 | * @inheritdoc 10 | */ 11 | public function write(string record) 12 | { 13 | echo record; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /owl/Log/Writer/File.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log\Writer; 3 | 4 | use Owl\Log\AbstractWriter; 5 | 6 | class File extends AbstractWriter 7 | { 8 | /** 9 | * @inheritdoc 10 | */ 11 | public function write(string record){ 12 | file_put_contents($this->getOption("logFile"), record . PHP_EOL, FILE_APPEND); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /owl/Log/WriterInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Log; 3 | 4 | interface WriterInterface 5 | { 6 | /** 7 | * Set formatter for writer 8 | */ 9 | public function setFormatter(var formatter); 10 | 11 | /** 12 | * Get formatter 13 | */ 14 | public function getFormatter() -> ; 15 | 16 | /** 17 | * Set options for writer 18 | */ 19 | public function setOptions(var options); 20 | 21 | /** 22 | * Get options for writer 23 | */ 24 | public function getOptions() -> array; 25 | 26 | /** 27 | * Set option for writer 28 | */ 29 | public function setOption(string option, var value); 30 | 31 | /** 32 | * Get option for writer 33 | */ 34 | public function getOption(string option); 35 | 36 | /** 37 | * Set message levels for writer 38 | */ 39 | public function setLevels(var levels); 40 | 41 | /** 42 | * Get message levels for writer 43 | */ 44 | public function getLevels() -> array; 45 | 46 | /** 47 | * Commit pack of messages 48 | */ 49 | public function commit(array records) -> boolean; 50 | 51 | /** 52 | * Push all messages 53 | */ 54 | public function push() -> boolean; 55 | } 56 | -------------------------------------------------------------------------------- /owl/Module/Manager.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Module; 3 | 4 | class Manager 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /owl/Mvc/Controller.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Mvc; 3 | 4 | use Owl\Http\Request; 5 | use Owl\Http\Response; 6 | use Owl\Di\ContainerInterface; 7 | 8 | class Controller implements ControllerInterface 9 | { 10 | /** 11 | * @var \Owl\Http\RequestInterface 12 | */ 13 | protected request { 14 | get 15 | }; 16 | 17 | /** 18 | * @var \Owl\Http\ResponseInterface 19 | */ 20 | protected response { 21 | get 22 | }; 23 | 24 | /** 25 | * @var \Owl\Di\ContainerInterface 26 | */ 27 | protected di { 28 | get 29 | }; 30 | 31 | public function __construct( request, response, di) 32 | { 33 | let this->request = request; 34 | let this->response = response; 35 | let this->di = di; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /owl/Mvc/ControllerInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Mvc; 3 | 4 | use Owl\Http\Request; 5 | use Owl\Http\Response; 6 | use Owl\Di\ContainerInterface; 7 | 8 | interface ControllerInterface 9 | { 10 | public function __construct( request, response, di); 11 | } 12 | -------------------------------------------------------------------------------- /owl/Mvc/View.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Mvc; 3 | 4 | use Owl\Exception; 5 | 6 | class View implements ViewInterface 7 | { 8 | /** 9 | * Base path for views 10 | */ 11 | protected path = "./../resources/views/" { 12 | get, set 13 | }; 14 | 15 | /** 16 | * Render view 17 | */ 18 | public function render(string! path, array parameters = null) -> string|boolean 19 | { 20 | if !file_exists(this->path . path) { 21 | throw new Exception("File is not exists"); 22 | } 23 | 24 | if !is_readable(this->path . path) { 25 | throw new Exception("File is not readable"); 26 | } 27 | 28 | ob_start(); 29 | 30 | if !is_null(parameters) { 31 | extract(parameters, EXTR_OVERWRITE); 32 | } 33 | 34 | require this->path . path; 35 | 36 | var tmp; 37 | let tmp = ob_get_contents(); 38 | 39 | ob_end_clean(); 40 | 41 | return tmp; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /owl/Mvc/View/Engine/Php.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Mvc\View\Engine; 3 | 4 | class Php 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /owl/Mvc/ViewInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Mvc; 3 | 4 | use Owl\Exception; 5 | 6 | interface ViewInterface 7 | { 8 | public function getPath() -> string; 9 | 10 | /** 11 | * Render view 12 | */ 13 | public function render(string! path, array parameters = null) -> string|boolean; 14 | } 15 | -------------------------------------------------------------------------------- /owl/Router/Http/StaticRoute.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Router\Http; 3 | 4 | class StaticRoute extends \Owl\Router\Route 5 | { 6 | public function __construct(string uri) 7 | { 8 | let this->uri = uri; 9 | } 10 | 11 | public function match(string uri) 12 | { 13 | return this->uri == uri; 14 | } 15 | } -------------------------------------------------------------------------------- /owl/Router/Route.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Router; 3 | 4 | use Owl\Http\Request; 5 | 6 | abstract class Route 7 | { 8 | const GET = 1; 9 | 10 | const POST = 2; 11 | 12 | const DELETE = 3; 13 | 14 | const PUT = 4; 15 | 16 | const ALL = 7; 17 | 18 | public uri; 19 | 20 | public method = self::ALL; 21 | 22 | public parameters; 23 | } 24 | -------------------------------------------------------------------------------- /owl/Router/RouterInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Router; 3 | 4 | use Owl\Http\Request; 5 | use Owl\Http\RequestInterface; 6 | 7 | interface RouterInterface 8 | { 9 | public function matchRequest( request); 10 | 11 | public function match(string uri, string method = Request::GET) -> object|boolean; 12 | } 13 | -------------------------------------------------------------------------------- /owl/Session/ManagerInterface.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Session; 3 | 4 | interface ManagerInterface 5 | { 6 | public fn start() -> boolean; 7 | 8 | public fn getId() -> string; 9 | 10 | public fn rememberMe(int! ttl); 11 | 12 | public fn forgetMe() -> void; 13 | } -------------------------------------------------------------------------------- /owl/Std/ArrayBag.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Std; 3 | 4 | class ArrayBag implements \Countable 5 | { 6 | protected elements; 7 | 8 | public function __construct(array! input) 9 | { 10 | let this->elements = input; 11 | } 12 | 13 | public function count() -> int 14 | { 15 | return count(this->elements); 16 | } 17 | 18 | public function set(string! key, var value) -> void 19 | { 20 | let this->elements[key] = value; 21 | } 22 | 23 | public function has(string! key) -> boolean 24 | { 25 | return isset this->elements[key]; 26 | } 27 | 28 | public function get(string! key, var defaultValue = null) -> var 29 | { 30 | var value; 31 | 32 | if fetch value, this->elements[key] { 33 | return value; 34 | } 35 | 36 | return defaultValue; 37 | } 38 | 39 | public function toArray() -> array 40 | { 41 | return this->elements; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /owl/Std/Collection/AbstractCollection.zep: -------------------------------------------------------------------------------- 1 | 2 | namespace Owl\Std\Collection; 3 | 4 | use Countable; 5 | use IteratorAggregate; 6 | 7 | abstract class AbstractCollection implements Countable, IteratorAggregate 8 | { 9 | /** 10 | * Get elements count from a collection 11 | */ 12 | abstract public function count(); 13 | 14 | /** 15 | * Get iterator 16 | */ 17 | abstract public function getIterator(); 18 | 19 | /** 20 | * Execute a function on each element in the collection 21 | */ 22 | abstract public function map(<\Closure> func); 23 | 24 | /** 25 | * Execute a function on each element in the collection and 26 | * removes the element from the collection if the executed function returns false 27 | */ 28 | abstract public function filter(func); 29 | 30 | /** 31 | * Set the current element to the first element and returns it 32 | */ 33 | abstract public function first(); 34 | 35 | /** 36 | * Set current element to the last element and returns it 37 | */ 38 | abstract public function last(); 39 | 40 | /** 41 | * Add a element to the collection 42 | */ 43 | abstract public function add(var element); 44 | } 45 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ./unit-tests/Owl/Tests/ 25 | ./unit-tests/Owl/Tests/DBAL/ 26 | 27 | 28 | ./unit-tests/Owl/Tests/DBAL/ 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /sandbox/annotation.php: -------------------------------------------------------------------------------- 1 | getDocComment()); 7 | var_dump($parse); 8 | 9 | foreach ($parse as $expr) { 10 | 11 | } 12 | 13 | 14 | foreach ($refClass->getMethods() as $method) { 15 | $parse = \Owl\Annotations\Reader::parse($method->getDocComment()); 16 | if ($parse) 17 | var_dump($parse); 18 | } -------------------------------------------------------------------------------- /tests/_bootstrap.php: -------------------------------------------------------------------------------- 1 | wantTo('Get user with not exists id'); 5 | $I->sendGET('users/500000000'); 6 | $I->seeResponseCodeIs(404); 7 | $I->seeResponseIsJson(); 8 | $I->haveHttpHeader('Content-Type','application/json'); 9 | -------------------------------------------------------------------------------- /tests/api/UsersGetSuccessCept.php: -------------------------------------------------------------------------------- 1 | wantTo('Get user'); 5 | $I->sendGET('users/1'); 6 | $I->seeResponseCodeIs(200); 7 | $I->seeResponseIsJson(); 8 | $I->haveHttpHeader('Content-Type','application/json'); 9 | -------------------------------------------------------------------------------- /tests/api/_bootstrap.php: -------------------------------------------------------------------------------- 1 | > parser.c 19 | if [ ! -f parser.c ]; then 20 | echo "error: re2c is not installed" 21 | exit 2 22 | fi 23 | 24 | sed s/"\#line"/"\/\/"/g scanner.c > xx && mv -f xx scanner.c 25 | sed s/"#line"/"\/\/"/g parser.c > xx && mv -f xx parser.c 26 | gcc -Wl,-rpath $TRAVIS_BUILD_DIR/build/lib \ 27 | -I/usr/local/include \ 28 | -L/usr/local/lib \ 29 | -L/opt/local/lib \ 30 | -I$TRAVIS_BUILD_DIR/build/include \ 31 | -L$TRAVIS_BUILD_DIR/build/lib \ 32 | -g3 -O0 -w parser.c scanner.c -ljson-c -o ../bin/zephir-parser 33 | 34 | cd .. 35 | 36 | ZEPHIRDIR="$( cd "$( dirname . )" && pwd )" 37 | sed "s#%ZEPHIRDIR%#$ZEPHIRDIR#g" bin/zephir > bin/zephir-cmd 38 | chmod 755 bin/zephir-cmd 39 | 40 | if [ ! -d ~/bin ]; then 41 | mkdir ~/bin 42 | fi 43 | 44 | cp bin/zephir-cmd ~/bin/zephir 45 | rm bin/zephir-cmd 46 | -------------------------------------------------------------------------------- /tests/ci/mysql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mysql -uroot -e 'create database owl_test charset=utf8 collate=utf8_unicode_ci;' 3 | mysql -uroot owl_test < ./tests/schemas/mysql/dump.sql 4 | -------------------------------------------------------------------------------- /tests/ci/owl.ini: -------------------------------------------------------------------------------- 1 | [owl] 2 | extension="owl.so" -------------------------------------------------------------------------------- /tests/ci/pgsql.bat: -------------------------------------------------------------------------------- 1 | psql -U postgres -c 'create database owl_test;' 2 | psql -U postgres -d owl_test -f tests/schemas/pgsql/dump.sql 3 | -------------------------------------------------------------------------------- /tests/ci/pgsql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | psql -U postgres -c 'create database owl_test;' 3 | psql -U postgres -d owl_test -f tests/schemas/pgsql/dump.sql 4 | -------------------------------------------------------------------------------- /tests/functional.suite.yml: -------------------------------------------------------------------------------- 1 | # Codeception Test Suite Configuration 2 | 3 | # suite for functional (integration) tests. 4 | # emulate web requests and make application process them. 5 | # Include one of framework modules (Symfony2, Yii2, Laravel4) to use it. 6 | 7 | class_name: FunctionalTester 8 | modules: 9 | enabled: [Filesystem, FunctionalHelper] 10 | -------------------------------------------------------------------------------- /tests/functional/_bootstrap.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ../../unit-tests/Owl/Tests/ 25 | ../../unit-tests/Owl/Tests/DBAL/ 26 | 27 | 28 | ../../unit-tests/Owl/Tests/DBAL/ 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/travis/mysql.travis.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ./unit-tests/Owl/Tests/ 25 | ./unit-tests/Owl/Tests/DBAL/ 26 | 27 | 28 | ./unit-tests/Owl/Tests/DBAL/ 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/travis/pgsql.travis.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ./unit-tests/Owl/Tests/ 25 | ./unit-tests/Owl/Tests/DBAL/ 26 | 27 | 28 | ./unit-tests/Owl/Tests/DBAL/ 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/unit.suite.yml: -------------------------------------------------------------------------------- 1 | # Codeception Test Suite Configuration 2 | 3 | # suite for unit (internal) tests. 4 | class_name: UnitTester 5 | modules: 6 | enabled: [Asserts, UnitHelper] 7 | -------------------------------------------------------------------------------- /tests/unit/_bootstrap.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Cache\Driver; 7 | 8 | /** 9 | * Class TestCase 10 | */ 11 | class MemcacheTest extends TestCase 12 | { 13 | public function setUp() 14 | { 15 | if (!extension_loaded($this->getDriverName())) { 16 | $this->markTestSkipped('The ' . __CLASS__ .' requires the use of ' . $this->getDriverName() . ' exstension'); 17 | } 18 | } 19 | 20 | public function getDriverName() 21 | { 22 | return 'memcache'; 23 | } 24 | 25 | public function testConstruct() 26 | { 27 | $driver = $this->getDriver(); 28 | $this->assertTrue(true); 29 | } 30 | 31 | public function testSetInstanceSuccess() 32 | { 33 | $driver = $this->getDriver(); 34 | $client = new \Memcache(); 35 | $client->addserver('localhost'); 36 | $driver->setInstance($client); 37 | } 38 | 39 | public function testGetInstance() 40 | { 41 | $driver = $this->getDriver(); 42 | $this->assertInstanceOf('Memcache', $driver->getInstance()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Cache/Driver/MemcachedTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Cache\Driver; 7 | 8 | /** 9 | * Class TestCase 10 | */ 11 | class MemcachedTest extends TestCase 12 | { 13 | public function setUp() 14 | { 15 | if (!extension_loaded($this->getDriverName())) { 16 | $this->markTestSkipped('The ' . __CLASS__ .' requires the use of ' . $this->getDriverName() . ' exstension'); 17 | } 18 | } 19 | 20 | public function getDriverName() 21 | { 22 | return 'memcached'; 23 | } 24 | 25 | public function testConstruct() 26 | { 27 | $driver = $this->getDriver(); 28 | $this->assertTrue(true); 29 | } 30 | 31 | public function testSetInstanceSuccess() 32 | { 33 | $driver = $this->getDriver(); 34 | $driver->setInstance(new \Memcached()); 35 | } 36 | 37 | public function testGetInstance() 38 | { 39 | $driver = $this->getDriver(); 40 | $this->assertInstanceOf('Memcached', $driver->getInstance()); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Cache/Driver/NativeArrayTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Cache\Driver; 7 | 8 | /** 9 | * Class TestCase 10 | */ 11 | class NativeArrayTest extends TestCase 12 | { 13 | public function getDriverName() 14 | { 15 | return 'NativeArray'; 16 | } 17 | 18 | public function testConstruct() 19 | { 20 | $driver = $this->getDriver(); 21 | $this->assertTrue(true); 22 | } 23 | 24 | public function testSetInstanceSuccess() 25 | { 26 | $driver = $this->getDriver(); 27 | $driver->setInstance(array()); 28 | } 29 | 30 | public function testGetInstance() 31 | { 32 | $driver = $this->getDriver(); 33 | $this->assertInternalType('array', $driver->getInstance()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Cache/Driver/RedisTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Cache\Driver; 7 | 8 | /** 9 | * Class TestCase 10 | */ 11 | class RedisTest extends TestCase 12 | { 13 | public function setUp() 14 | { 15 | if (!extension_loaded($this->getDriverName())) { 16 | $this->markTestSkipped('The ' . __CLASS__ .' requires the use of ' . $this->getDriverName() . ' exstension'); 17 | } 18 | } 19 | 20 | public function getDriverName() 21 | { 22 | return 'redis'; 23 | } 24 | 25 | public function testConstruct() 26 | { 27 | $driver = $this->getDriver(); 28 | $this->assertTrue(true); 29 | } 30 | 31 | public function testSetInstanceSuccess() 32 | { 33 | $driver = $this->getDriver(); 34 | $client = new \Redis(); 35 | $client->connect('localhost'); 36 | $driver->setInstance($client); 37 | } 38 | 39 | public function testGetInstance() 40 | { 41 | $driver = $this->getDriver(); 42 | $this->assertInstanceOf('Redis', $driver->getInstance()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/ControllerTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests; 7 | 8 | use Owl\Http\Request; 9 | use Owl\Mvc\Controller; 10 | 11 | class ControllerTest extends \PHPUnit_Framework_TestCase 12 | { 13 | public function testSuccessConstructPass() 14 | { 15 | $controller = new Controller(Request::createFromGlobals(), new \Owl\Http\Response\Json(), new \Owl\Di\Container()); 16 | $this->assertInstanceOf('Owl\Http\RequestInterface', $controller->getRequest()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/DBAL/ConnectionTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\DBAL; 7 | 8 | use Owl\DBAL; 9 | use Owl\Tests\Utils; 10 | 11 | class ConnectionTest extends TestCase 12 | { 13 | protected $connection; 14 | 15 | /** 16 | * Set connection 17 | */ 18 | public function setUp() 19 | { 20 | $this->connection = Utils::getConnection(); 21 | } 22 | 23 | public function testGetDriver() 24 | { 25 | $this->assertInstanceOf('Owl\DBAL\Driver\\' . $this->getDriverName(), $this->connection->getDriver()); 26 | } 27 | 28 | public function testPrepare() 29 | { 30 | $sql = 'SELECT * FROM `users`'; 31 | 32 | /** 33 | * We dont use own PDOStatement via it's not supported for PERSISTENT connections 34 | */ 35 | $this->assertInstanceOf('PDOStatement', $this->connection->prepare($sql)); 36 | } 37 | 38 | public function testIsConnection() 39 | { 40 | $this->assertTrue($this->connection instanceof DBAL\Connection); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/DBAL/TestCase.php: -------------------------------------------------------------------------------- 1 | 5 | */ 6 | 7 | namespace Owl\Tests\DBAL; 8 | 9 | use Owl\DBAl; 10 | 11 | class TestCase extends \Owl\Tests\TestCase 12 | { 13 | /** 14 | * @return string 15 | * @throws \Exception 16 | */ 17 | public function getDriverName() 18 | { 19 | switch (getenv('db_type')) { 20 | case 'mysql': 21 | case 'pdo_mysql': 22 | return 'MySQL'; 23 | break; 24 | 25 | case 'pgsql': 26 | case 'pdo_pgsql': 27 | return 'PgSQL'; 28 | break; 29 | 30 | default: 31 | throw new \Exception('Unknown driver: ' . getenv('db_type')); 32 | break; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/EventManagerTest.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | 11 | class EventManagerTest extends \PHPUnit_Framework_TestCase 12 | { 13 | public function testSimple() 14 | { 15 | $runs = 0; 16 | 17 | $em = new Manager(); 18 | $em->listen('test', function () use (&$runs) { 19 | $runs++; 20 | }); 21 | 22 | $em->emit('test'); 23 | $em->emit('test'); 24 | $em->emit('test'); 25 | 26 | $this->assertSame(3, $runs); 27 | } 28 | 29 | protected $runs = 0; 30 | 31 | public function simpleListen() 32 | { 33 | $this->runs++; 34 | } 35 | 36 | public function testSimpleCallableThis() 37 | { 38 | $this->assertSame(0, $this->runs); 39 | 40 | $em = new Manager(); 41 | $em->listen('test', [$this, 'simpleListen']); 42 | 43 | $em->emit('test'); 44 | $this->assertSame(1, $this->runs); 45 | 46 | $em->emit('test'); 47 | $this->assertSame(2, $this->runs); 48 | 49 | $em->emit('test'); 50 | $this->assertSame(3, $this->runs); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Http/Response/JsonTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Http\Response; 7 | 8 | use Owl\Http\Response\Json; 9 | 10 | class JsonTest extends \Owl\Tests\Http\ResponseTest 11 | { 12 | public function testGetSetContent() 13 | { 14 | $response = new Json(); 15 | $response->setContent(true); 16 | $this->assertEquals('true', $response->getContent()); 17 | 18 | $response = new Json(); 19 | $response->setContent('foo'); 20 | $this->assertEquals('"foo"', $response->getContent()); 21 | 22 | $response = new Json(); 23 | $response->setContent(array('foo' => 'bar')); 24 | $this->assertEquals('{"foo":"bar"}', $response->getContent()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Http/ResponseTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Http; 7 | 8 | use Owl\Http\Response; 9 | 10 | class ResponseTest extends \PHPUnit_Framework_TestCase 11 | { 12 | public function testGetSetCode() 13 | { 14 | $response = new Response(); 15 | $this->assertSame(200, $response->getStatusCode()); 16 | 17 | $response->setStatusCode(404); 18 | $this->assertSame(404, $response->getStatusCode()); 19 | 20 | $response->setStatusCode(500); 21 | $this->assertSame(500, $response->getStatusCode()); 22 | } 23 | 24 | public function testGetSetContent() 25 | { 26 | $response = new Response(); 27 | $this->assertSame("", $response->getContent()); 28 | 29 | $response->setContent("test"); 30 | $this->assertSame("test", $response->getContent()); 31 | 32 | $response->setContent("Hello World!"); 33 | $this->assertSame("Hello World!", $response->getContent()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Log/WriterBrowserTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Log; 7 | 8 | use Owl\Log\Record; 9 | use Owl\Log\Writer\EchoBrowser; 10 | 11 | /** 12 | * Class WriterBrowserTest 13 | */ 14 | class WriterBrowserTest extends \PHPUnit_Framework_TestCase 15 | { 16 | 17 | public function testWriterBrowserPush() 18 | { 19 | $record = new Record(1, 2, 3); 20 | 21 | $writer = new EchoBrowser(); 22 | $writer->commit([ 23 | $record 24 | ]); 25 | 26 | ob_start(); 27 | $writer->push(); 28 | $buffer = ob_get_contents(); 29 | ob_end_clean(); 30 | 31 | $formatted_record = $writer->getFormatter()->format($record); 32 | 33 | $this->assertTrue($buffer == $formatted_record); 34 | } 35 | 36 | public function testWriterBrowserDestruct() 37 | { 38 | $record = new Record(1, 2, 3); 39 | 40 | $writer = new EchoBrowser(); 41 | $writer->commit([ 42 | $record 43 | ]); 44 | 45 | $formatted_record = $writer->getFormatter()->format($record); 46 | 47 | ob_start(); 48 | unset($writer); 49 | $buffer = ob_get_contents(); 50 | ob_end_clean(); 51 | 52 | $this->assertTrue($buffer == $formatted_record); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Log/WriterFileTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Log; 7 | 8 | use Owl\Log\Record; 9 | use Owl\Log\Writer\File; 10 | 11 | /** 12 | * Class WriterFileTest 13 | */ 14 | class WriterFileTest extends \PHPUnit_Framework_TestCase 15 | { 16 | 17 | public function testWriterFileWrite() 18 | { 19 | $record = new Record(1, 2, 3); 20 | 21 | $logFile = __DIR__ . "/temp.log"; 22 | 23 | $writer = new File(); 24 | $writer->setOptions([ 25 | 'logFile' => $logFile 26 | ]); 27 | $writer->commit([ 28 | $record 29 | ]); 30 | $writer->push(); 31 | 32 | $formatted_record = $writer->getFormatter()->format($record); 33 | $written_record = trim(file_get_contents($logFile)); 34 | 35 | unlink($logFile); 36 | $this->assertTrue($written_record == $formatted_record); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Router/RouteTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Router; 7 | 8 | class RouteTest extends \PHPUnit_Framework_TestCase 9 | { 10 | public function testParameterParsing() 11 | { 12 | $router = new \Owl\Router\Http\DynamicRoute('/user/id:int/'); 13 | $result = $router->match('/user/1/'); 14 | 15 | $this->assertInternalType('array', $result); 16 | $this->assertCount(1, $result); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/ServiceManagerTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests; 7 | 8 | class ServiceManagerTest extends \PHPUnit_Framework_TestCase 9 | { 10 | public function testSuccessConstructPass() 11 | { 12 | $serviceManager = new \Owl\Di\Container(); 13 | $this->assertFalse($serviceManager->has('test')); 14 | 15 | $serviceManager->set('test', new \Owl\Router\Router()); 16 | $this->assertTrue($serviceManager->has('test')); 17 | 18 | $this->assertInstanceOf('Owl\Router\Router', $serviceManager->get('test')); 19 | } 20 | 21 | /** 22 | * @expectedException Exception 23 | * @expectedExceptionMessage Instance wasn't found by name: test 24 | */ 25 | public function testExceptionOnUnknownInstance() 26 | { 27 | $serviceManager = new \Owl\Di\Container(); 28 | $this->assertFalse($serviceManager->has('test')); 29 | 30 | $serviceManager->get('test'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Std/ArrayBagTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\Std; 7 | 8 | use Owl\Std\ArrayBag; 9 | 10 | class ArrayBagTest extends \PHPUnit_Framework_TestCase 11 | { 12 | public function testSimple() 13 | { 14 | $bag = new ArrayBag(['test1' => true, 'test2' => false]); 15 | $this->assertCount(2, $bag); 16 | 17 | $this->assertTrue($bag->has('test1')); 18 | $this->assertEquals(true, $bag->get('test1')); 19 | $this->assertEquals(true, $bag->get('test1', false)); 20 | 21 | $this->assertTrue($bag->has('test2')); 22 | $this->assertEquals(false, $bag->get('test2')); 23 | $this->assertEquals(false, $bag->get('test2', true)); 24 | 25 | $this->assertFalse($bag->has('test3')); 26 | 27 | $this->assertEquals(null, $bag->get('test3')); 28 | $this->assertEquals(true, $bag->get('test3', true)); 29 | $this->assertEquals(12345, $bag->get('test3', 12345)); 30 | } 31 | 32 | public function testCount() 33 | { 34 | $bag = new ArrayBag([]); 35 | $this->assertCount(0, $bag); 36 | 37 | $bag = new ArrayBag(['test' => 1]); 38 | $this->assertCount(1, $bag); 39 | 40 | $bag->set('test1', true); 41 | $this->assertCount(2, $bag); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/TestCase.php: -------------------------------------------------------------------------------- 1 | 5 | */ 6 | 7 | namespace Owl\Tests; 8 | 9 | class TestCase extends \PHPUnit_Framework_TestCase 10 | { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/Utils.php: -------------------------------------------------------------------------------- 1 | 5 | */ 6 | 7 | namespace Owl\Tests; 8 | 9 | use Owl\DBAL; 10 | use Owl\Event\Manager; 11 | 12 | class Utils 13 | { 14 | public static function getConnection() 15 | { 16 | $eventsManager = new Manager(); 17 | 18 | switch (getenv('db_type')) { 19 | case 'mysql': 20 | case 'pdo_mysql': 21 | $driver = new DBAL\Driver\MySQL( 22 | 'mysql:host='.getenv('db_host').';charset=utf8;dbname='.getenv('db_name').';port=' . getenv('db_port'), 23 | getenv('db_username'), 24 | getenv('db_password'), 25 | array() 26 | ); 27 | break; 28 | case 'pgsql': 29 | case 'pdo_pgsql': 30 | $driver = new DBAL\Driver\PgSQL( 31 | 'pgsql:host='.getenv('db_host').';dbname='.getenv('db_name').';port=' . getenv('db_port'), 32 | getenv('db_username'), 33 | getenv('db_password'), 34 | array() 35 | ); 36 | break; 37 | default: 38 | throw new \InvalidArgumentException('Unsupported db type : ' . getenv('db_type')); 39 | break; 40 | } 41 | 42 | $connection = new DBAL\Connection(['driver' => $driver], $eventsManager); 43 | return $connection; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /unit-tests/Owl/Tests/View/EngineTest.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace Owl\Tests\View; 7 | 8 | use Owl\Tests\TestCase; 9 | 10 | /** 11 | * Class TestCase 12 | */ 13 | class EngineTest extends TestCase 14 | { 15 | public function testSimple() 16 | { 17 | $view = new \Owl\Mvc\View(); 18 | $view->setPath(__DIR__ . '/../../app/resources/views/'); 19 | 20 | $this->assertSame("Hello, World!\n", $view->render('static.phtml')); 21 | } 22 | 23 | public function testDynamic() 24 | { 25 | $view = new \Owl\Mvc\View(); 26 | $view->setPath(__DIR__ . '/../../app/resources/views/'); 27 | 28 | $this->assertSame("Hello, Dmitry @ovr!\n", $view->render('dynamic.phtml', ['username' => 'Dmitry @ovr'])); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /unit-tests/Owl/app/IndexController.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | namespace RestApp\Controller; 7 | 8 | class IndexController extends \Owl\Mvc\Controller 9 | { 10 | public function indexAction() 11 | { 12 | return array( 13 | 'test' => 1, 14 | 'key' => 'value', 15 | 'action' => __FUNCTION__ 16 | ); 17 | } 18 | 19 | public function viewAction() 20 | { 21 | return array( 22 | 'test' => 1, 23 | 'key' => 'value', 24 | 'action' => __FUNCTION__ 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /unit-tests/Owl/app/resources/views/dynamic.phtml: -------------------------------------------------------------------------------- 1 | Hello, ! 2 | -------------------------------------------------------------------------------- /unit-tests/Owl/app/resources/views/static.phtml: -------------------------------------------------------------------------------- 1 | Hello, World! 2 | --------------------------------------------------------------------------------