Skip to content

ansata-biz/page-seo-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page Seo library

Library to simplify managing and retrieving seo strings configurations from a config array

Build Status

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()));

About

Library to simplify managing and retrieving seo strings configurations from a config array

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages