<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 07:01:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[NetTuts.com: Reflection in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19484</guid>
      <link>http://www.phpdeveloper.org/news/19484</link>
      <description><![CDATA[<p>
On NetTuts.com today there's a new tutorial talking about a part of PHP that can be quite powerful but isn't used too often - <a href="http://net.tutsplus.com/tutorials/php/reflection-in-php/">reflection in PHP</a>. Using Reflection you can get information about your actual code and its elements without having to try to parse it yourself.
</p>
<blockquote>
Reflection is generally defined as a program's ability to inspect itself and modify its logic at execution time. In less technical terms, reflection is asking an object to tell you about its properties and methods, and altering those members (even private ones). In this lesson, we'll dig into how this is accomplished, and when it might prove useful.
</blockquote>
<p>
They provide a little context around the idea of "reflection" in programming languages and then jump right in with a few sample classes. They set up their "Nettuts", "Manager" and "Editor" classes and show how to use the <a href="http://php.net/reflectionclass">ReflectionClass</a> functionality to get their structure. The examples show how to get the class' methods, their properties and calling these methods using things like <a href="http://php.net/manual/en/reflectionmethod.invoke.php">invoke</a> and <a href="http://php.net/call_user_func">call_user_func</a>.
</p>
Link: http://net.tutsplus.com/tutorials/php/reflection-in-php]]></description>
      <pubDate>Fri, 19 Apr 2013 10:24:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Introspection and Reflection in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18006</guid>
      <link>http://www.phpdeveloper.org/news/18006</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's an <a href="http://phpmaster.com/introspection-and-reflection-in-php/">introduction to Reflection</a>, a feature of PHP that allows you to peer into the code itself and find out metadata like class properties, scope levels and parent classes.
</p>
<blockquote>
PHP introspection is a common feature in any programming language which allows object classes to be manipulated by the programmer. You'll find introspection particularly useful when you don't know which class or method you need to execute at design time. [...] During this article, you'll see a couple examples of how to use some of the most useful PHP's introspection function and a section dedicated to an API that offers functionality similar to introspection, the Reflection API.
</blockquote>
<p>
They introduce you to a few different methods including <a href="http://php.net/class_exists">class_exists</a>, <a href="http://php.net/get_class">get_class</a> and <a href="http://php.net/is_subclass_of</a> and examples of their use. There's also a few other useful functions described like <a href="http://php.net/get_class_vars">get_class_vars</a> and <a href="http://php.net/method_exists">method_exists</a>. They also briefly mention the "ReflectionClass" that's a part of the PHP Reflection API and how it can be used to make an instance pointing to a current class.
</p>]]></description>
      <pubDate>Fri, 25 May 2012 14:03:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Maarten Balliauw's Blog: A client side Glimpse to your PHP application]]></title>
      <guid>http://www.phpdeveloper.org/news/16669</guid>
      <link>http://www.phpdeveloper.org/news/16669</link>
      <description><![CDATA[<p>
<i>Maarten Balliauw</i> has <a href="http://blog.maartenballiauw.be/post/2011/08/02/A-client-side-Glimpse-to-your-PHP-application.aspx">announced the release</a> of a PHP port of a powerful tool for server-side introspection of your applications - <a href="https://github.com/Glimpse/Glimpse.PHP">Glimpse for PHP</a>.
</p>
<blockquote>
A few months ago, the .NET world was surprised with a magnificent tool called "<a href="http://getglimpse.com/">Glimpse</a>". Today I'm pleased to release a <a href="https://github.com/Glimpse/Glimpse.PHP">first draft of a PHP version for Glimpse</a>! Now what is this Glimpse thing… Well: "what Firebug is for the client, Glimpse does for the server... in other words, a client side Glimpse into whats going on in your server."
</blockquote>
<p>
He includes a of how the introspection works and some <a href="http://blog.maartenballiauw.be/post/2011/08/02/A-client-side-Glimpse-to-your-PHP-application.aspx">sample code</a> using a phar to add it to your PHP application. You can see it in action in <a href="http://www.screenr.com/27ds">this screencast</a> based on the PHP Azure Contest website. He also shows one very cool feature that allows for cross-device tracking of requests. You can find this PHP port of Glimpse <a href="https://github.com/Glimpse/Glimpse.PHP">on github</a>.
</p>]]></description>
      <pubDate>Wed, 03 Aug 2011 11:28:54 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Elated.com: Object-Oriented PHP: Autoloading, Serializing, and Querying Objects]]></title>
      <guid>http://www.phpdeveloper.org/news/16542</guid>
      <link>http://www.phpdeveloper.org/news/16542</link>
      <description><![CDATA[<p>
On Elated.com today there's the <a href="http://www.elated.com/articles/object-oriented-php-autoloading-serializing-and-querying-objects/">fourth part of their series</a> looking at object oriented programming in PHP. This time the focus is specifically on autoloading classes, making objects into strings (serialized) and introspection.
</p>
<blockquote>
If you've read all the articles up to this point then you're already familiar with the most important concepts of object-oriented programming in PHP: classes, objects, properties, methods, and inheritance. In this final (for now, at least!) tutorial in the series, I'm going to tie up some loose ends and look at some other useful OOP-related features of PHP.
</blockquote>
<p>
He looks at each of the three topics above and includes code for things like a simple autoloader, object serialization, using sleep/wakeup and an example of using functions like <a href="http://php.net/get_class">get_class</a>, <a href="http://php.net/get_class_methods">get_class_methods</a> and <a href="http://php.net/get_object_vars">get_object_vars</a> to do introspection on your classes and objects.
</p>]]></description>
      <pubDate>Fri, 01 Jul 2011 08:29:45 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Alexey Zakhlestins' Blog: GObject for PHP (new bindings project)]]></title>
      <guid>http://www.phpdeveloper.org/news/15954</guid>
      <link>http://www.phpdeveloper.org/news/15954</link>
      <description><![CDATA[<p>
In a <a href="http://blog.milkfarmsoft.com/2011/02/gobject-for-php-new-bindings-project/">new post</a> <i>Alexey Zakhlestins</i> talks about a project he's been working on, a part of the split up with PHP-GTK out into separate projects. His part of the group is GObject with has now been <a href="https://github.com/indeyets/gobject-for-php">moved over to github</a>.
</p>
<blockquote>
This new PHP extension is called "GObject for PHP", so, my main concern, obviously is building comfortable bridge between GObject objects and PHP's objects. It starts to work, but there's a lot of stuff to be done. Please join the project, if you are interested. We need more hands!
</blockquote>
<p>
He describes some of the features already in the library - counterparts for parts of the current GObject world in PHP including GType, GSignal and GParamSpec. This is all on the master branch. In his "introspection" branch he's working on the <a href="http://live.gnome.org/GObjectIntrospection">introspection idea</a> the GNOME community has been working towards too.
</p>]]></description>
      <pubDate>Thu, 24 Feb 2011 08:25:23 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Springboard Software Blog: Using Introspection in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5703</guid>
      <link>http://www.phpdeveloper.org/news/5703</link>
      <description><![CDATA[<p>
In <a href="http://blog.springboard-software.com/?p=12">this new post</a> on the Springboard Software blog today, <i>Michael</i> takes a look at a very handy feature that PHP has to offer those working with objects - a form of introspection.
</p>
<blockquote>
<p>
One of the things we love about Java is its ability to use introspection. Don't know what methods or field an object has? Just ask it.
</p>
<p>
It turns out that PHP provides some nifty introspection features as well. We've found one to be particularly useful: the ability of a PHP object to tell us its member variables at runtime. Not sure what that means? Let's look at an example.
</p>
</blockquote>
<p>
In <a href="http://blog.springboard-software.com/?p=12">his example</a>, he uses a content management system, specifically the "business objects" to illustrate his point. Introspection comes into play when the get_class_vars function is called, returning the defined variables for an object and allowing one to feed in values to be automagically set (in this case, either an array, a request, or a primary key for a record from the database).
</p>]]></description>
      <pubDate>Tue, 27 Jun 2006 11:48:01 -0500</pubDate>
    </item>
  </channel>
</rss>
