Javaism in PHP

What an interesting piece of code showcasing two major features in PHP namely namespacing and annotation (not really a core feature but common in those Javaism PHP frameworks). Influenced by Java and implemented "superbly" in PHP. Best decision for PHP going forward.
/**
 *@var\Doctrine\Common\Collections\Collection<\TYPO3\Blog\Domain\Model\Post>
 *@ORM\OneToMany(mappedBy="blog")
 *@ORM\OrderBy({"date"="DESC"})
 */
protected $posts;

No comments:

Post a Comment