This repository has been archived by the owner on Sep 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mario Basic
committed
Jul 3, 2017
1 parent
9d7d433
commit fe53ec5
Showing
20 changed files
with
177 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
vendor/ | ||
|
||
.idea | ||
.php_cs.cache | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,30 @@ | ||
# Bard | ||
|
||
[](https://travis-ci.org/laravelista/Bard) [](https://packagist.org/packages/laravelista/bard) [](https://packagist.org/packages/laravelista/bard) [](https://packagist.org/packages/laravelista/bard) [](https://packagist.org/packages/laravelista/bard) [](https://gitter.im/laravelista/Bard?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[](https://travis-ci.org/laravelista/Bard) [](https://packagist.org/packages/laravelista/bard) [](https://packagist.org/packages/laravelista/bard) [](https://packagist.org/packages/laravelista/bard) [](https://packagist.org/packages/laravelista/bard) [](https://gitter.im/laravelista/Bard?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
|
||
 | ||
|
||
Tired of unstable and bloated PHP sitemap packages? | ||
|
||
**Look no more!** | ||
|
||
Bard is the simplest PHP Sitemap package, just add some urls and you are ready to go. Did I mention that *it supports multilingual locations aka hreflangs*. | ||
|
||
**But wait, there is more.** | ||
|
||
If you are using Laravel you'll have access to some *extra awesomeness* with convenient boilerplate that makes creating sitemaps a breeze. | ||
|
||
## Features | ||
|
||
- Framework Agnostic Sitemap Package | ||
- Laravel Friendly also other Frameworks friendly :) | ||
- Common Sitemap Boilerplate for Laravel and other Frameworks | ||
- Create Sitemaps | ||
- Create Sitemap Index | ||
- Return XML response | ||
- Get XML string | ||
- Input Validation | ||
|
||
**Everything is tested like crazy with PhpSpec** | ||
|
||
|
||
**Look no more!** | ||
|
||
Bard is the simplest PHP Sitemap package, just add some URLs and you are ready to go. Did I mention that *it supports multilingual locations aka hreflangs*. | ||
|
||
## Syntax | ||
|
||
``` | ||
$sitemap->addUrl('http://domain.com/contact') | ||
->setPriority(0.8) | ||
->setChangeFrequency('hourly') | ||
->setLastModification(Carbon::now()) | ||
->addTranslation('hr', 'http://domain.com/hr/contact'); | ||
``` | ||
|
||
## List of all poems | ||
|
||
- [Install me gently](https://github.com/laravelista/Bard/wiki/Installation) | ||
- [Let me show you how to use me](https://github.com/laravelista/Bard/wiki/Usage) | ||
- [Learn the API](https://github.com/laravelista/Bard/wiki/Learn-the-API) | ||
- [Laravel + Bard](https://github.com/laravelista/Bard/wiki/Laravel-and-Bard) | ||
- [Laravel Boilerplate](https://github.com/laravelista/Bard/wiki/Laravel-Boilerplate) | ||
|
||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
<?php namespace Laravelista\Bard\Helpers; | ||
<?php | ||
|
||
trait Matchers { | ||
namespace Laravelista\Bard\Helpers; | ||
|
||
trait Matchers | ||
{ | ||
/** | ||
* getMatchers() should return an array with keys describing the expectations and values the closures | ||
* containing the logic of the expectations. The first parameter in the closure is the output | ||
* of the executed method. | ||
* | ||
* @return array | ||
*/ | ||
function getMatchers() | ||
public function getMatchers() | ||
{ | ||
return [ | ||
// Checks if the given $result is valid xml | ||
'beValidXml' => function ($result) | ||
{ | ||
if ( ! simplexml_load_string($result)) return false; | ||
'beValidXml' => function ($result) { | ||
if (! simplexml_load_string($result)) { | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
]; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<?php namespace Laravelista\Bard\Interfaces; | ||
<?php | ||
|
||
interface Generatable { | ||
namespace Laravelista\Bard\Interfaces; | ||
|
||
interface Generatable | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function generate(); | ||
} | ||
} |
Oops, something went wrong.