Phalcon PHP Framework Documentation Release 3.1.1

Phalcon PHP Framework Documentation Release 3.1.1

Phalcon PHP Framework Documentation Release 3.1.1 Phalcon Team Jun 23, 2017 Contents 1 Apa itu Phalcon 3 2 Daftar Isi 5 2.1 Installation................................................5 2.1.1 Installation...........................................5 2.1.2 Phalcon Developer Tools.................................... 25 2.2 Tutorials................................................. 45 2.2.1 Tutorial 1: Let’s learn by example............................... 45 2.2.2 Tutorial 2: Introducing INVO.................................. 56 2.2.3 Tutorial 3: Securing INVO................................... 61 2.2.4 Tutorial 4: Working with the CRUD.............................. 70 2.2.5 Tutorial 5: Customizing INVO................................. 86 2.2.6 Tutorial 6: Vökuró....................................... 88 2.2.7 Tutorial 7: Creating a Simple REST API............................ 92 2.2.8 List of examples........................................ 102 2.3 Components............................................... 103 2.3.1 Injeksi Ketergantungan/Lokasi Service............................. 103 2.3.2 The MVC Architecture..................................... 116 2.3.3 Menggunakan Kontroler.................................... 117 2.3.4 Working with Models...................................... 124 2.3.5 Model Relationships...................................... 142 2.3.6 Model Events.......................................... 156 2.3.7 Model Behaviors........................................ 162 2.3.8 Models Metadata........................................ 167 2.3.9 Model Transactions....................................... 172 2.3.10 Validating Models........................................ 176 2.3.11 Working with Models (Advanced)............................... 179 2.3.12 Phalcon Query Language (PHQL)............................... 189 2.3.13 Caching in the ORM...................................... 206 2.3.14 ODM (Object-Document Mapper)............................... 219 2.3.15 Using Views........................................... 232 2.3.16 View Helpers (Tags)...................................... 252 2.3.17 Pengelolaan Aset........................................ 264 2.3.18 Volt: Template Engine..................................... 271 2.3.19 Aplikasi MVC......................................... 295 2.3.20 Routing............................................. 302 i 2.3.21 Dispatch Kontroler....................................... 323 2.3.22 Micro Applications....................................... 334 2.3.23 Working with Namespaces................................... 349 2.3.24 Events Manager......................................... 351 2.3.25 Request Environment...................................... 358 2.3.26 Returning Responses...................................... 361 2.3.27 Pengelolaan Cookies...................................... 364 2.3.28 Generating URLs and Paths.................................. 366 2.3.29 Pesan Flash........................................... 369 2.3.30 Storing data in Session..................................... 373 2.3.31 Penyaringan dan Sanitasi.................................... 376 2.3.32 Escape Kontekstual....................................... 380 2.3.33 Validation............................................ 384 2.3.34 Forms.............................................. 391 2.3.35 Membaca Konfigurasi...................................... 402 2.3.36 Pagination............................................ 406 2.3.37 Meningkatkan Performa dengan Cache............................. 409 2.3.38 Security............................................. 417 2.3.39 Enkripsi/Dekripsi........................................ 421 2.3.40 Access Control Lists (ACL).................................. 423 2.3.41 Multi-lingual Support...................................... 432 2.3.42 Class Autoloader........................................ 435 2.3.43 Logging............................................. 440 2.3.44 Parser Anotasi.......................................... 446 2.3.45 Aplikasi Command Line.................................... 452 2.3.46 Images.............................................. 456 2.3.47 Queueing............................................ 461 2.3.48 Lapisan Abstraksi Database.................................. 463 2.3.49 Internationalization....................................... 478 2.3.50 Database Migrations...................................... 480 2.3.51 Mendebug Aplikasi....................................... 488 2.3.52 Unit testing........................................... 492 2.4 In Depth Explanations / Further Reading................................ 496 2.4.1 Increasing Performance: What’s next?............................. 496 2.4.2 Dependency Injection Explained................................ 504 2.4.3 Understanding How Phalcon Applications Work........................ 510 2.5 API.................................................... 514 2.5.1 API Indice............................................ 514 2.6 Legal................................................... 1110 2.6.1 License............................................. 1110 3 Previous Versions 1111 4 Format lain 1113 ii Phalcon PHP Framework Documentation, Release 3.1.1 Selamat datang di Phalcon framework. Misi kami adalah memberimu tool canggih untuk mengembangkan website dan aplikasi web yang lebih cepat dengan PHP. Contents 1 Phalcon PHP Framework Documentation, Release 3.1.1 2 Contents CHAPTER 1 Apa itu Phalcon Phalcon adalah framework PHP full stack open source, ditulis sebagai ekstensi C, dioptimasi untuk performa tinggi. Anda tidak perlu belajar atau menggunakan bahasa C, karena fungsionalitasnya disediakan sebagai kelas PHP siap untuk Anda gunakan. Phalcon juga loose-coupled, memungkinkan Anda menggunakan objek-objeknya sebagai kom- ponen perekat sesuai kebutuhan aplikasi Anda. Phalcon tidak hanya tentang performa, tujuan kami adalah membuatnya kokoh, kaya fitur dan mudah digunakan! 3 Phalcon PHP Framework Documentation, Release 3.1.1 4 Chapter 1. Apa itu Phalcon CHAPTER 2 Daftar Isi Installation Installation PHP extensions require a slightly different installation method to a traditional PHP-based library or framework. You can either download a binary package for the system of your choice or build it from the sources. Windows To use phalcon on Windows you can download a DLL library. Edit your php.ini file and then append at the end: extension=php_phalcon.dll Restart your webserver. The following screencast is a step-by-step guide to install Phalcon on Windows: Related Guides Installation on XAMPP XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. Once you download XAMPP, all you have to do is extract it and start using it. Below are detailed instructions on how to install Phalcon on XAMPP for Windows. Using the latest XAMPP version is highly recommended. Download the right version of Phalcon XAMPP is always releasing 32 bit versions of Apache and PHP. You will need to download the x86 version of Phalcon for Windows from the download section. 5 Phalcon PHP Framework Documentation, Release 3.1.1 After downloading the Phalcon library you will have a zip file like the one shown below: Extract the library from the archive to get the Phalcon DLL: Copy the file php_phalcon.dll to the PHP extensions. If you have installed XAMPP in the C:\xampp folder, the extension needs to be in C:\xampp\php\ext Edit the php.ini file, it is located at C:\xampp\php\php.ini. It can be edited with Notepad or a similar program. We recommend Notepad++ to avoid issues with line endings. Append at the end of the file: extension=php_phalcon.dll and save it. Restart the Apache Web Server from the XAMPP Control Center. This will load the new PHP configuration. Open your browser to navigate to http://localhost. The XAMPP welcome page will appear. Click on the link phpinfo(). phpinfo() will output a significant amount of information on screen about the current state of PHP. Scroll down to check if the phalcon extension has been loaded correctly. If you can see the phalcon version in the phpinfo() output, congrats!, You are now flying with Phalcon. Screencast The following screencast is a step by step guide to install Phalcon on Windows: Related Guides • General Installation • Detailed Installation on WAMP for Windows 6 Chapter 2. Daftar Isi Phalcon PHP Framework Documentation, Release 3.1.1 2.1. Installation 7 Phalcon PHP Framework Documentation, Release 3.1.1 8 Chapter 2. Daftar Isi Phalcon PHP Framework Documentation, Release 3.1.1 2.1. Installation 9 Phalcon PHP Framework Documentation, Release 3.1.1 Installation on WAMP WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Below are detailed instructions on how to install Phalcon on WampServer for Windows. Using the latest WampServer version is highly recommended. Download the right version of Phalcon WAMP has both 32 and 64 bit versions. From the download section, you can choose the Phalcon for Windows accordingly to your desired architecture. After download the Phalcon library you will have a zip file like the one shown below: Extract the library from the archive to get the Phalcon DLL: Copy the file php_phalcon.dll to the PHP extensions. If WAMP is installed in the C:\wamp folder, the extension needs to be in C:\wamp\bin\php\php5.5.12\ext Edit the php.ini file, it is located at C:\wamp\bin\php\php5.5.12\php.ini. It can be edited with Notepad or a simi- lar program. We recommend Notepad++ to avoid issues with line

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1117 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us