awg / page-seo-lib
Library to simplify managing and retrieving seo strings configurations from a config array
dev-master
2014-09-19 11:34 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-11-18 14:52:56 UTC
README
Library to simplify managing and retrieving seo strings configurations from a config array
Installation
Use Composer. Just add this dependency to your composer.json
:
"require": { "awg/page-seo-lib": "dev-master" }
Usage example
$configuration = new \Awg\PageSeo\Configuration\InheritanceArrayProvider(array( 'route1' => array( 'title' => 'Route 1: Hello, %name%', 'keywords' => 'Common Route Keywords' ), 'route2' => array( 'inherit' => '@route1', 'title' => 'Route 2: Hello, %name%' ) ), array( 'description' => 'Default Route Description' )); $renderer = new \Awg\PageSeo\Render\BasicRenderer(new \Awg\PageSeo\Render\Engine\PlaceholderEngine()); $manager = new \Awg\PageSeo\Manager($configuration, $renderer); var_dump($manager->renderTitle('route1', array('name' => 'John Doe'))); var_dump($manager->renderKeywords('route2', array())); var_dump($manager->renderDescription('route2', array()));