What is the status of PHPDoc? [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I never cared much about documenting my code before, but recently I started working on an open source project and the need arose. Obviously the 'weapon of choice" is PHPDoc, but...
I couldn't really find a single specification of the PHPDoc standard. There is a wikipedia entry listing some of the properties and there is the phpDocumentor project, which supposedly has a more extensive dictionary, but what puzzles me is where is the definitive guide of PHPDoc? Is there a single standard or it is up to all those numerous phpDocumentor knockoffs to extend the PHPDoc "standard" (if any) to whatever they seem fit.
If we assume that phpDocumentor is the place where the PHPDoc standard is created and maintained, things look pretty grim, since the project's website is dead for for about almost 4 years now. And what puzzles me even more is that about a month ago a version 1.4.4 suddenly appeared from the dead on the Pear site of phpDocumentor.
I know there are a lot more smarted and knowledgable fellows around here, so I would like to know. What is the deal with PHPDoc. Is there a single authority that creates the standard? How reliable is it? Is there any future or we are dealing with a zombie and all hope is lost...
Thanks,
Ivo

According to Wikipedia it's dead.
The specifications for the standard for PhpDoc tags used to be what was listed in the documentation for PhpDocumentor. But like I said, it's dead. As DocBlox seems to be filling the void that PhpDocumentor left, I'd advise using the DocBlox documentation as the basis for how you do your PhpDoc comments.
I'm hoping Netbeans 7.1 will introduce DocBlox support because it's so much better. It's PHP 5.3 aware and it's actively maintained.

This question is already a bit old, but for the sake of information, I should add that DocBlox was merged with PhpDocumentor.
Announcing phpDocumentor 2 – the merging of the old (phpDocumentor)
and the new (DocBlox).
With the first alpha release of phpDocumentor (2.0.0a1), the new
“Responsive” default template sports a new page layout, along with the
useful layout improvements that the original DocBlox templates
provided (which remain available) over the old phpDocumentor templates
(which will retire with old phpDocumentor). Explore this new template
at http://demo.phpdoc.org/Responsive/index.html.
=> http://www.docblox-project.org/2012/03/docblox-is-unmasked-it-is-really-phpdocumentor-2/
PHPDoc is back to the action. =)

As of Aug. 2013 the the PHP Framework Interoperability Group began began writing a formal specification (PSR) for PHPDoc. The proposed standard for PHPDoc, current draft PSR5: https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md
The current draft updates the specification to address PHP 5.3+, as well as other changes which have occurred. I believe the expectation is this standard for php comments will be adopted accross multiple doc generators.

Related

PHP session handling to save to database [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Learning PHP, the most frustrating hurdle for me seems to be weeding through outdated tutorials, blog and forum posts to find relevant, modern guides.
I want to understand how to implement saving sessions data to databases the right way. However, most of the instructions I can find regard custom session handlers, and seem to be many years old, and this concerns me. I don't want to waste my time learning outdated procedures. Are custom handlers still the way to accomplish this? Are there better/newer modes of storing sessions to db's? I would greatly appreciate anyone taking the time to point me in the right direction. Many thanks!
To confirm what #rickdenhaan was saying in comments, custom handlers is the right way to go.
PHP doesn't provide a lot of different session handles. Maybe because Zend (which supports PHP) provide Zend Session tools.
To avoid reinventing the wheel you have to options :
Use a framework
That will handle all of this kind of stuff for you : session, MVC, ORM, config files etc
Most of the time this is the right choice for a new project, and Symfony and Laravel are great projects to start.
Use external modules
If you want a more modular approach, you can import externals modules with composer and create something that suits your particular needs.
This can be a great approach to refactor an existing project (either based on an old framework, or on legacy code)
And in this case, you still don't reinvent the wheel, you can use Zend Tools to handle your session :
https://github.com/zendframework/zend-session
Install it with composer and start working with it. Use it with built-in php tools session_set_save_handler()
I hope this answer your question in a broader way.

How to create ORC or Parquet files from PHP code? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Is there any library that can be used to write custom data files from a PHP app in ORC or Parquet format for Presto queries ?
If not what is the best practice in this case? Hopefully one that doesn't involve setting up Map Reduce cluster.
10X
- Nir
Sorry for bumping, but I felt this question should be updated.
Last year, I released the first publicly available PHP library for reading/writing Parquet files, php-parquet.
See https://github.com/jocoon/php-parquet and/or the published composer package https://packagist.org/packages/jocoon/parquet (composer require jocoon/parquet). It is a partial port of and inspired by parquet-dotnet, based on the Apache Thrift specifications.
As far as you don't have special compression needs (e.g. snappy), you won't need exotic PHP extensions. BCMath and GMP are required, due to the possibility of arbitrary-precision numbers and you'll need to have zlib available (AFAIK the most-used/typical compression method for Parquet files, to be more precise: gzip).
Basic usage instructions are provided on the respective github page.
DISCLAIMER: I'm the developer of this package. This is not meant as advertising. The library is published under the MIT license. Feel free to submit issues or contribute.
There is the https://github.com/apache/parquet-cpp project that provides a C++ implementation to write Parquet files without any use of MapReduce or the JVM. While there are already Python (https://arrow.apache.org/docs/python/parquet.html), Ruby / GLib (https://github.com/red-data-tools/parquet-glib) and NodeJS (https://github.com/skale-me/node-parquet) bindings, there are none yet for PHP. But given those mentioned bindings, you should be able to write ones for PHP quite easily.
We’ve Apache licensed https://github.com/skipprd/php-parquet, a PHP binding for the C++ https://github.com/apache/parquet-cpp implementation that’s been battle tested by skippr.io.
Pleased to see another effort on jocoon/php-parquet too. So now there’s a C binding and a PHP implementation to choose from! :)
DISCLAIMER: I'm the developer of this package. This is not meant as advertising. The library is published under the Apache license. Feel free to submit issues or contribute.

Mastering Joomla [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am planning to develop a portal using Joomla cms.
The portal has to be fully customized.
I would like to know some best tutorials and books for Joomla CMS customization.
Thanks
Really the best thing I've tried - and believe me I tried a lot - is by using Lynda.com. Its very cheap and it has some really great video tutorials about Joomla. You can also learn how to develop modules and components if you are an OOP developer.
http://www.lynda.com/search?q=joomla&x=0&y=0
Also for books I would suggest the "officials" from Core Devs of the Joomla Platform
Joomla-Programming
Joomla-Templates by Angie Radtke
In this order:
Joomla! 1.5: A User's Guide: Building a Successful Joomla! Powered Website (2nd Edition) by Barrie M. North
Joomla! 1.5 Template Design by Tessa Blakeley Silver
Learning Joomla! 1.5 Extension Development by Joseph LeBlanc
Mastering Joomla! 1.5 Extension and Framework Development: The Professional Guide to Programming Joomla! by James Kennard
Where you start on that list depends on your current ability and what your goals are. #1 is for beginners. If you want to do template design and already know html and css, then #2 is the place to start. If you are doing custom module and components and you already know PHP, then start with #3 and #4.
HowToJoomla is what you're looking for.
If you're going to be doing modules or components, the offical Joomla! wiki is by no means exhaustive, but can be useful for some common tasks. Check the 'Developers' section.
There are some decent tutorials at jlleblanc.com here:
http://www.jlleblanc.com/content/blogcategory/0/51/
If you're a bit more of a hardened dev, then the Joomla API docs can be useful, but I do admit they're hard to browse (it's not always obvious which package any given class will be in), so it's often easier to search them using Google or similar.
And there is Joomla! 1.7 - Beginner's Guide in several languages.
Joomla's documentation is mainly aimed at 1.5 right now. The API is not as documented as it could be, with a lot of method names that are things like printfooter() and the documentation says 'prints the footer' (I'm looking at you, pagination class).
The books recommended above are solid. There is a 1.7 MVC component tutorial as well that leaves out details, but between that and careful reading of source code and the Joomla API you can slowly get something out of it.
The biggest hurdle is going to be memorization. Lots of Joomla Class methods are not intuitive or the best documented (for instance, using the _() setup to run lots of arbitrary class/method combinations).

Converting from Eclipse PDT to Vim [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I truly love VIM - it's one of only a handful of applications I've every come across that make you feel warm and fuzzy inside. However, for PHP development, I still use PDT Eclipse although I would love to switch.
The reason I can't quite at the moment is the CTRL+SPACE code-assist functionality that I rely on so much - it's so useful, especially when type hinting, or using PHPDoc variable comment blocks.
I know there are cool plugins for VIM out there that can probably replicate this functionality and then some - but what are they?
Vim has OmniCompletion built in, you should add this to your .vimrc:
filetype plugin on
au FileType php set omnifunc=phpcomplete#CompletePHP
In addition I recommend you this plugins:
VTreeExplorer
snippetsEmu
and also take a look to this article about php debugging in Vim, and this paper, it has many useful tips for using Vim in PHP Development.
Code assist it's a new feature of VIM 7
[Ctrl+x] [Ctrl+o] will auto complete your code or open a popup of options
More features of VIM 7 can be found in this blogpost
Btw, I too like vim, but the PDT (and other IDEs) has much more features than code assist that make me preffer them over it.
Look at SuperTab for making tab-autocompletion in Vim a bit easier to use than the standard bindings. You may also want to look into ctags, if you're into code indexing. Google "php vim ctags" and you'll see plenty of articles describing how to set it up.
The official Vim Wiki has a PHP section with some good tips, like integrating the official PHP documentation.

Anything better than PHPDoc out there? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anybody use anything else to document their PHP code than PHPDoc?
Are there any tools that read the same documentation syntax but give richer output?
I´ll go for doxygen too.
Here are several reasons :
compatible with phpdoc tags and other popular ones : it´s interoperable
works with various programming languages : a better time investment
there is alternative syntaxes : can choose the commenting style that suit you
very efficient with advanced formating / tagging / metadata
there is a GUI that is not linked to any IDE and an eclipse plugin as well
And still free, multiplatform, and open source :-)
It´s easy to learn, but harder that phpdoc because a lot richer.
You could try DocBlox; which is intended to be an alternative for phpDocumentor but with support for additional features of which full PHP 5.3 support is one. An additional benefit is that is it quite fast and uses relatively little memory.
You can read more on http://www.docblox-project.org or see a demo at http://demo.docblox-project.org/default
Another option other than phpDocumentor is Doxygen documentation with PHP support.
Doxygen (www.doxygen.org).
ApiGen
http://apigen.org/
ApiGen has support for PHP 5.3 namespaces, packages, linking between documentation, cross referencing to PHP standard classes and general documentation, creation of highlighted source code and experimental support for PHP 5.4 traits.
DocBlox
http://www.docblox-project.org/
PHP 5.3 compatible API Documentation generator aimed at projects of all sizes and Continuous Integration.
able to fully parse and transform Zend Framework 2
I've not used it with PHP, but doxygen claims to support the language.
I am using Doxygen too - you get used to the various keywords really fast - they are kind of self-explaining. ;)
RubyDoc is nice too, I espcially like they layout of the rdocs.
Doctrine uses PHPDoctor, which appears to work well with 5.3 in my tests.
http://peej.github.com/phpdoctor/#download
If you need to document code for PHP 5.3+, eg. if it uses namespaces Ted Kulp's fork of PHPDoctor might be your answer.

Categories