Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!
Strony WWWSerwery VPSDomenyHostingDarmowy Hosting CBA.pl

Archive for Grudzień, 2017

Mustafa Magdi: Introduction to PHP Reflection API

Mustafa Magdi: Introduction to PHP Reflection API

Mustafa Magdi has written up a tutorial that introduces you to PHP’s Reflection API, functionality included with the language that allows for introspection of the code and some real-time modifications.

When I started PHP coding, I wasn’t aware of the power of Reflection API and the main reason is that I didn’t need it to design my simple class, module or even my package, then I started to find it in many areas playing a major role. So in this part we will introduce Reflection API.

The post is then broken down into a few sections covering the basics of the Reflection functionality, examples of it in use and some other references you can use to get more information. Code examples are included to show how to use the API to do things like:

  • get the parent class for a current class
  • get the docblock comment of a method
  • making private methods available for testing

He also links to two packages that make use of the Reflection API heavily to generate documentation and build a dependency injection container.

Source: http://www.phpdeveloper.org/news/25842

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Mustafa Magdi: Introduction to PHP Reflection API

Mustafa Magdi: Introduction to PHP Reflection API

Mustafa Magdi has written up a tutorial that introduces you to PHP’s Reflection API, functionality included with the language that allows for introspection of the code and some real-time modifications.

When I started PHP coding, I wasn’t aware of the power of Reflection API and the main reason is that I didn’t need it to design my simple class, module or even my package, then I started to find it in many areas playing a major role. So in this part we will introduce Reflection API.

The post is then broken down into a few sections covering the basics of the Reflection functionality, examples of it in use and some other references you can use to get more information. Code examples are included to show how to use the API to do things like:

  • get the parent class for a current class
  • get the docblock comment of a method
  • making private methods available for testing

He also links to two packages that make use of the Reflection API heavily to generate documentation and build a dependency injection container.

Source: http://www.phpdeveloper.org/news/25842

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Tomas Votruba: Composer Local Packages for Dummies

Tomas Votruba: Composer Local Packages for Dummies

In a post to his site Tomas Votruba provides a guide "for dummies" to using local packages along side your remote packages via Composer.

I wrote about pros and cons of local packages before. After year of using this in practice and mentorings I polished this approach to even simpler version that is easy to start with.

[...] There is no need to use Github, love open-source, understand package design or understand composer beyond PSR-4. No symlink issues, no forgotten composer update. Anyone can start using this!

The "dummy" packages he creates are essentially a simulation of a Composer package just in a different location (under a "packages" directory). This can then be autoloaded via the same Composer configuration you already use without too much trouble.

Source: http://www.phpdeveloper.org/news/25841

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Tomas Votruba: Composer Local Packages for Dummies

Tomas Votruba: Composer Local Packages for Dummies

In a post to his site Tomas Votruba provides a guide "for dummies" to using local packages along side your remote packages via Composer.

I wrote about pros and cons of local packages before. After year of using this in practice and mentorings I polished this approach to even simpler version that is easy to start with.

[...] There is no need to use Github, love open-source, understand package design or understand composer beyond PSR-4. No symlink issues, no forgotten composer update. Anyone can start using this!

The "dummy" packages he creates are essentially a simulation of a Composer package just in a different location (under a "packages" directory). This can then be autoloaded via the same Composer configuration you already use without too much trouble.

Source: http://www.phpdeveloper.org/news/25841

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Jeff Madsen: Using Laravel Translation Strings in Vue.js

Jeff Madsen: Using Laravel Translation Strings in Vue.js

Jeff Madsen has a new post to his site showing you how integrate Laravel’s translations strings with a Vue.js frontend making it simpler to maintain only one source for the translation of content in your application.

One issue you will face if you need to make a multi-lingual site is how to keep your translations organized for both your back-end framework and your javascript components. I’m going to demonstrate the basic technique for this, using Laravel and Vue.js for my example.

While his examples make use of Laravel and Vue.js, the approach is agnostic of most tools and could be modified to integrate with other technologies pretty easily. He builds a system where the translations are kept in PHP files which are converted into something Vue can read and use. He starts with the backend, showing how to use Laravel’s localization functionality to set up the files and shift between languages. He then makes use of the lang.js library to pull the contents of these files into Vue and adds in a bit of code to push those values into components.

Source: http://www.phpdeveloper.org/news/25840

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Jeff Madsen: Using Laravel Translation Strings in Vue.js

Jeff Madsen: Using Laravel Translation Strings in Vue.js

Jeff Madsen has a new post to his site showing you how integrate Laravel’s translations strings with a Vue.js frontend making it simpler to maintain only one source for the translation of content in your application.

One issue you will face if you need to make a multi-lingual site is how to keep your translations organized for both your back-end framework and your javascript components. I’m going to demonstrate the basic technique for this, using Laravel and Vue.js for my example.

While his examples make use of Laravel and Vue.js, the approach is agnostic of most tools and could be modified to integrate with other technologies pretty easily. He builds a system where the translations are kept in PHP files which are converted into something Vue can read and use. He starts with the backend, showing how to use Laravel’s localization functionality to set up the files and shift between languages. He then makes use of the lang.js library to pull the contents of these files into Vue and adds in a bit of code to push those values into components.

Source: http://www.phpdeveloper.org/news/25840

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Blast from the Past – One Year Ago in PHP (12.28.2017)

Site News: Blast from the Past – One Year Ago in PHP (12.28.2017)

Here’s what was popular in the PHP community one year ago today:

Source: http://www.phpdeveloper.org/news/25839

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHPUgly Podcast: Episode 87 – We Forget John

PHPUgly Podcast: Episode 87 – We Forget John

The PHPUgly podcast, hosted by Eric Van Johnson, *John Congdon and Thomas Rideout has posted their latest episode – Episode #87: We Forget John.

Topics mentioned include:

You can listen to this latest episode either using the in-page audio player or you can download the mp3 directly for listening at your leisure. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter for updates when new shows are released.

Source: http://www.phpdeveloper.org/news/25838

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHPUgly Podcast: Episode 87 – We Forget John

PHPUgly Podcast: Episode 87 – We Forget John

The PHPUgly podcast, hosted by Eric Van Johnson, *John Congdon and Thomas Rideout has posted their latest episode – Episode #87: We Forget John.

Topics mentioned include:

You can listen to this latest episode either using the in-page audio player or you can download the mp3 directly for listening at your leisure. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter for updates when new shows are released.

Source: http://www.phpdeveloper.org/news/25838

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHPUgly Podcast: Episode 87 – We Forget John

PHPUgly Podcast: Episode 87 – We Forget John

The PHPUgly podcast, hosted by Eric Van Johnson, *John Congdon and Thomas Rideout has posted their latest episode – Episode #87: We Forget John.

Topics mentioned include:

You can listen to this latest episode either using the in-page audio player or you can download the mp3 directly for listening at your leisure. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter for updates when new shows are released.

Source: http://www.phpdeveloper.org/news/25838

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>