Skip to content

Commit

Permalink
merged branch lsmith77/component_readmes (PR #2561)
Browse files Browse the repository at this point in the history
Commits
-------

1e370d7 typo fix
93d8d44 added some more infos about Config
27efd59 added READMEs for the bridges
cbbe9ae cosmetic tweaks
d6af3f1 fixed README for Console
b2b2eb2 added basic README files for all components

Discussion
----------

added basic README files for all components and bridges

heavily based on http://fabien.potencier.org/article/49/what-is-symfony2 and the official Symfony2 documentation

---------------------------------------------------------------------------

by jmikola at 2011/11/03 13:36:07 -0700

Great work. For syntax highlighting on the PHP snippets, you could add "php" after the three backticks.

---------------------------------------------------------------------------

by lsmith77 at 2011/11/03 13:41:29 -0700

done

---------------------------------------------------------------------------

by stealth35 at 2011/11/03 13:49:31 -0700

Nice job, but you also need to add `<?php`

ex :

``` php
<?php
use Symfony\Component\DomCrawler\Crawler;

$crawler = new Crawler();
$crawler->addContent('<html><body><p>Hello World!</p></body></html>');

print $crawler->filter('body > p')->text();
```

---------------------------------------------------------------------------

by lsmith77 at 2011/11/03 13:56:57 -0700

done

---------------------------------------------------------------------------

by ericclemmons at 2011/11/03 19:57:57 -0700

@lsmith77 Well done!  This makes consumption of individual components that much easier, *especially* now that `composer.json` files have been added.

---------------------------------------------------------------------------

by lsmith77 at 2011/11/04 01:18:23 -0700

ok .. fixed the issues you mentioned @fabpot

---------------------------------------------------------------------------

by lsmith77 at 2011/11/11 15:00:27 -0800

@fabpot anything else left? seems like an easy merge .. and imho there is considerable benefit for our efforts to spread the word about the components with this PR merged.

---------------------------------------------------------------------------

by drak at 2011/11/11 18:54:13 -0800

You know, it might be a nice idea to put a link to the documentation for each component if there is some at symfony.com

---------------------------------------------------------------------------

by lsmith77 at 2011/11/12 00:59:14 -0800

i did that in some. but i might have missed a few places.
On 12.11.2011, at 03:54, Drak <reply@reply.github.com> wrote:

> You know, it might be a nice idea to put a link to the documentation for each component if there is some at symfony.com
>
> ---
> Reply to this email directly or view it on GitHub:
> symfony/symfony#2561 (comment)

---------------------------------------------------------------------------

by breerly at 2011/11/21 10:28:36 -0800

Pretty excited with this.

---------------------------------------------------------------------------

by dbu at 2011/11/24 00:02:50 -0800

is there anything we can help with to make this ready to be merged?

---------------------------------------------------------------------------

by lsmith77 at 2011/12/18 02:39:23 -0800

@fabpot: seriously .. if you are not going to deliver something "better" and don't provide a reason what is wrong with this .. then its beyond frustrating. i obviously do not claim that these README's are perfect (and certainly still no replacement for proper documentation), but I do claim that in their current form they are a radical step forward to potential users of the Symfony2 components.
  • Loading branch information
fabpot committed Dec 18, 2011
2 parents ccea250 + cbbe9ae commit c0b7768
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions README.md
@@ -0,0 +1,43 @@
Finder Component
================

The Finder provides a very convenient and nice fluent interface to find files
and directories on the filesystem:

```
use Symfony\Component\Finder\Finder;
$finder = new Finder();
$iterator = $finder
->files()
->name('*.php')
->depth(0)
->size('>= 1K')
->in(__DIR__);
foreach ($iterator as $file) {
print $file->getRealpath()."\n";
}
```

But you can also use it to find files stored remotely like in this example where
we are looking for files on Amazon S3:

```
$s3 = new \Zend_Service_Amazon_S3($key, $secret);
$s3->registerStreamWrapper("s3");
$finder = new Finder();
$finder->name('photos*')->size('< 100K')->date('since 1 hour ago');
foreach ($finder->in('s3://bucket-name') as $file) {
print $file->getFilename()."\n";
}
```

Resources
---------

Unit tests:

https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Finder

0 comments on commit c0b7768

Please sign in to comment.