承接 matuck/aliasbundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

matuck/aliasbundle

Composer 安装命令:

composer require matuck/aliasbundle

包简介

Provides a catch all route

README 文档

README

A system to remap any url to a url of your choosing

Documentation

Installation

Pretty simple with Composer, add:

{
    "require": {
        "matuck/aliasbundle": "dev-master"
    }
}

Then run the below command to install the bundle

php composer.phar update

Database tables also need to created so run

php app/console Doctrine:schema:update --force

Configure

Add the below snippet to the very bottom of your routing.yml file

matuck_alias:
    resource: "@matuckAliasBundle/Resources/config/routing.yml"
    prefix:   /

This has to be the very last entry or your hard defined routes will not work.

Usage

From inside a controller

$service = $this->get('matuck_alias');

//To create a new alias of /myalias which goes to path www.example.com/page/somepage
$service->createAlias('/myalias', '/page/somepage');

//Delete an alias of /myalias
$service->deleteAlias('/myalias');

//Get the true path for an alias in this case returns /page/somepage
$service->getTruepath('myalias');

//Gets an array of aliases for a truepath
$aliases = $service->getAliasesForTruePath('/page/somepage');
foreach($aliases as $alias)
{
    echo $alias->getAlias();
}

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-v3
  • 更新时间: 2013-10-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固