<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Moving VuFind to Zend Framework 2: Part 4 &#8212; Command Line Tools</title>
	<atom:link href="http://blog.library.villanova.edu/libtech/2012/07/19/moving-vufind-to-zend-framework-2-part-4-command-line-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.library.villanova.edu/libtech/2012/07/19/moving-vufind-to-zend-framework-2-part-4-command-line-tools/</link>
	<description>Knowledge Sharing from Falvey&#039;s Technology Team</description>
	<lastBuildDate>Thu, 14 Mar 2013 19:32:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: dkatz</title>
		<link>http://blog.library.villanova.edu/libtech/2012/07/19/moving-vufind-to-zend-framework-2-part-4-command-line-tools/#comment-85</link>
		<dc:creator>dkatz</dc:creator>
		<pubDate>Tue, 14 Aug 2012 12:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.library.villanova.edu/libtech/?p=122#comment-85</guid>
		<description><![CDATA[Curtis,

Glad to hear you were able to solve your own problem.

On my end, I&#039;ve further updated VuFind to better integrate some of the new Zend\Console features -- specifically, I have replaced echo calls with \Zend\Console\Console::writeLine(), and I have replaced exit() calls with return $this-&gt;getResponse()-&gt;setErrorLevel() calls.  The relevant diffs are here:

http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=3108e046d043db4ec1829d589410925bea2677a7

I still need to think about whether to replace my custom routing solution with the new built-in console router.  For the moment, I&#039;m still using my custom router in combination with the old \Zend\Console\Getopt parameter processing.

Based on a bit of investigation, I don&#039;t think I can easily incorporate the new router with my &quot;individual PHP files for individual actions&quot; approach.  The best way to move forward without creating nasty hacks would probably be to replace all the individual PHP files with shell scripts and batch files that call index.php with the relevant action/controller parameters concatenated with user input.  This may technically be a better solution than what we currently have, but it would break backward compatibility (i.e. people would need to change their existing automation to call scripts instead of execute PHP) and it would clutter up the directories (since cross-platform compatibility would require both batch files and shell scripts for every single action).  For now, it&#039;s a backburner item.]]></description>
		<content:encoded><![CDATA[<p>Curtis,</p>
<p>Glad to hear you were able to solve your own problem.</p>
<p>On my end, I&#8217;ve further updated VuFind to better integrate some of the new Zend\Console features &#8212; specifically, I have replaced echo calls with \Zend\Console\Console::writeLine(), and I have replaced exit() calls with return $this-&gt;getResponse()-&gt;setErrorLevel() calls.  The relevant diffs are here:</p>
<p><a href="http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=3108e046d043db4ec1829d589410925bea2677a7" rel="nofollow">http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=3108e046d043db4ec1829d589410925bea2677a7</a></p>
<p>I still need to think about whether to replace my custom routing solution with the new built-in console router.  For the moment, I&#8217;m still using my custom router in combination with the old \Zend\Console\Getopt parameter processing.</p>
<p>Based on a bit of investigation, I don&#8217;t think I can easily incorporate the new router with my &#8220;individual PHP files for individual actions&#8221; approach.  The best way to move forward without creating nasty hacks would probably be to replace all the individual PHP files with shell scripts and batch files that call index.php with the relevant action/controller parameters concatenated with user input.  This may technically be a better solution than what we currently have, but it would break backward compatibility (i.e. people would need to change their existing automation to call scripts instead of execute PHP) and it would clutter up the directories (since cross-platform compatibility would require both batch files and shell scripts for every single action).  For now, it&#8217;s a backburner item.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis</title>
		<link>http://blog.library.villanova.edu/libtech/2012/07/19/moving-vufind-to-zend-framework-2-part-4-command-line-tools/#comment-84</link>
		<dc:creator>Curtis</dc:creator>
		<pubDate>Tue, 14 Aug 2012 04:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.library.villanova.edu/libtech/?p=122#comment-84</guid>
		<description><![CDATA[I managed to get it working and I was wrong, there&#039;s pretty good documentation provided by Zend:

http://packages.zendframework.com/docs/latest/manual/en/modules/zend.console.controllers.html

The use of the zf command confused me though since it&#039;s been removed while they refactor it. It took me a while to figure out calling the index.php file after creating a console route was what I needed.]]></description>
		<content:encoded><![CDATA[<p>I managed to get it working and I was wrong, there&#8217;s pretty good documentation provided by Zend:</p>
<p><a href="http://packages.zendframework.com/docs/latest/manual/en/modules/zend.console.controllers.html" rel="nofollow">http://packages.zendframework.com/docs/latest/manual/en/modules/zend.console.controllers.html</a></p>
<p>The use of the zf command confused me though since it&#8217;s been removed while they refactor it. It took me a while to figure out calling the index.php file after creating a console route was what I needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis</title>
		<link>http://blog.library.villanova.edu/libtech/2012/07/19/moving-vufind-to-zend-framework-2-part-4-command-line-tools/#comment-83</link>
		<dc:creator>Curtis</dc:creator>
		<pubDate>Tue, 14 Aug 2012 03:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.library.villanova.edu/libtech/?p=122#comment-83</guid>
		<description><![CDATA[Demian,

If you do update your code for the new Zend Console stuff, I&#039;d like to see how it&#039;s done. There&#039;s basically zero documentation for it and I&#039;m having a hard time figuring out how to create a cli script.]]></description>
		<content:encoded><![CDATA[<p>Demian,</p>
<p>If you do update your code for the new Zend Console stuff, I&#8217;d like to see how it&#8217;s done. There&#8217;s basically zero documentation for it and I&#8217;m having a hard time figuring out how to create a cli script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dkatz</title>
		<link>http://blog.library.villanova.edu/libtech/2012/07/19/moving-vufind-to-zend-framework-2-part-4-command-line-tools/#comment-79</link>
		<dc:creator>dkatz</dc:creator>
		<pubDate>Thu, 26 Jul 2012 19:10:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.library.villanova.edu/libtech/?p=122#comment-79</guid>
		<description><![CDATA[As noted at the top of the article, the release of Zend Framework 2 RC1 this week renders this text largely obsolete.  ZF2 now has native Console libraries that do some of this work.

Since I don&#039;t currently have time to fully investigate the new capabilities, I have put in some workarounds to allow my existing solution to continue functioning -- it just amounts to moving some logic from the CLI module&#039;s bootstrap callback into a custom router, and skipping a few other bootstrap routines when running in console mode.

Here are the Git commits in case you are interested:

http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=cd85deb6c2984aa6ac56a76879230e7397fe4af5

http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=a30f235ca61c278fb3a883e11c65c522007f0b43

However, this is just a temporary solution.  I need to come up with something that&#039;s better integrated with the framework.  I&#039;ll work on that later after some higher priority refactoring is done, and I&#039;ll try to post something here if the subject isn&#039;t better-documented elsewhere by that time.]]></description>
		<content:encoded><![CDATA[<p>As noted at the top of the article, the release of Zend Framework 2 RC1 this week renders this text largely obsolete.  ZF2 now has native Console libraries that do some of this work.</p>
<p>Since I don&#8217;t currently have time to fully investigate the new capabilities, I have put in some workarounds to allow my existing solution to continue functioning &#8212; it just amounts to moving some logic from the CLI module&#8217;s bootstrap callback into a custom router, and skipping a few other bootstrap routines when running in console mode.</p>
<p>Here are the Git commits in case you are interested:</p>
<p><a href="http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=cd85deb6c2984aa6ac56a76879230e7397fe4af5" rel="nofollow">http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=cd85deb6c2984aa6ac56a76879230e7397fe4af5</a></p>
<p><a href="http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=a30f235ca61c278fb3a883e11c65c522007f0b43" rel="nofollow">http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=a30f235ca61c278fb3a883e11c65c522007f0b43</a></p>
<p>However, this is just a temporary solution.  I need to come up with something that&#8217;s better integrated with the framework.  I&#8217;ll work on that later after some higher priority refactoring is done, and I&#8217;ll try to post something here if the subject isn&#8217;t better-documented elsewhere by that time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
