Documentation

FakeDataMigration extends BaseMigration
in package

fake data migration

Table of Contents

Properties

$translators  : array<string|int, mixed>
$container  : ContainerInterface
$link_exchange_urls  : array<string|int, mixed>
$locales  : array<string|int, mixed>
$lorem_ipsum_p  : string
$menu_names  : array<string|int, mixed>
$site_email  : string
$website_id  : int

Methods

__call()  : mixed
{@inheritdoc}
__construct()  : mixed
constructor
containerCall()  : mixed
call method through container
containerMake()  : mixed
create object through container
down()  : void
undo the migration
getApp()  : App
gets app object
getAppRouteInfo()  : RouteInfo|null
gets route info
getAppWebsite()  : Website|null
gets current website
getAssets()  : Manager
gets assets manager
getCache()  : Manager
get cache manager
getContainer()  : ContainerInterface
gets container object
getCrudRouter()  : Crud
gets crud service
getDb()  : Database
gets db object
getDebugbar()  : StandardDebugBar
gets debugbar object
getEnv()  : mixed
gets env variable
getEventManager()  : SharedEventEmitter
gets events manager service
getGoogleAuthenticator()  : PHPGangsta_GoogleAuthenticator
gets google authenticator service
getGuzzle()  : Client
gets guzzle service
getHtmlRenderer()  : HtmlPartsRenderer
gets html renderer service
getIcons()  : Icons
gets icons service
getImagine()  : Imagine
gets imagine service
getLog()  : Logger
gets log object
getMailer()  : Mailer
gets mailer service
getName()  : string
gets migration name
getPdo()  : PDO
gets PDO object
getRedis()  : Manager
gets redis service
getRequest()  : Request
gets current request object
getRouters()  : array<string|int, mixed>
gets routers
getSchema()  : Schema
gets schema object
getSearch()  : Manager
gets search service
getSesMailer()  : SesClient
gets SES mailer service
getSiteData()  : SiteData
gets site data service
getSmtpMailer()  : Swift_Mailer
gets SMTP mailer service
getTemplates()  : Engine
gets plates engine object
getTranslator()  : Translator
gets translator
getUtils()  : Globals
gets global utils service
getWebhooksRouter()  : Webhooks
gets webhooks service
getWebRouter()  : Web
gets routing service
getZip()  : Zip
gets zip service
requestUrl()  : string|bool
executes an http request
up()  : void
do the migration
getService()  : mixed
gets registered service
addBlock()  : Block
adds a block model
addContactForm()  : Contact
adds a contact form model
addEvent()  : Event
adds a event model
addLinkExchange()  : LinkExchange
adds a link model
addMenuItem()  : Menu
adds a menu item model
addNews()  : News
adds a news model
addPage()  : Page
adds a page model
addTerm()  : Taxonomy
adds a term model
createImage()  : MediaElement
generates an image

Properties

$translators

public static array<string|int, mixed> $translators = []

translators

protected array<string|int, mixed> $link_exchange_urls = ["https://www.google.com", "https://www.wikipedia.org", "https://stackoverflow.com", "https://linux.org/", "https://www.php.net"]

links

$locales

protected array<string|int, mixed> $locales = ['en', 'fr', 'it', 'ro']

locales

$lorem_ipsum_p

protected string $lorem_ipsum_p = '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed viverra sapien nunc, id suscipit sem fermentum eget. Maecenas euismod mauris nibh, id interdum est ultricies nec. Integer euismod justo non ullamcorper facilisis. Fusce varius quam et enim tristique rutrum. Morbi feugiat pretium ultrices. Aenean eu sem ac massa commodo accumsan. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ullamcorper pharetra dictum. Fusce rutrum auctor sapien. Aenean vel lectus ex. Duis dictum nisl quis mauris ullamcorper ullamcorper. </p>'

lorem ipsum paragraph

$site_email

protected string $site_email = 'admin@localhost'

site mail address

Methods

__construct()

constructor

public __construct(ContainerInterface $container) : mixed
Parameters
$container : ContainerInterface

containerCall()

call method through container

public containerCall(callable $callable[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$callable : callable
$arguments : array<string|int, mixed> = []

containerMake()

create object through container

public containerMake(string $className[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$className : string
$arguments : array<string|int, mixed> = []

getContainer()

gets container object

public getContainer() : ContainerInterface
Return values
ContainerInterface

getDb()

gets db object

public getDb() : Database
Tags
throws
BasicException
Return values
Database

getDebugbar()

gets debugbar object

public getDebugbar() : StandardDebugBar
Tags
throws
BasicException
Return values
StandardDebugBar

getEnv()

gets env variable

public getEnv(string $variable[, mixed $default = null ]) : mixed
Parameters
$variable : string
$default : mixed = null
Tags
throws
BasicException

getEventManager()

gets events manager service

public getEventManager() : SharedEventEmitter
Tags
throws
BasicException
Return values
SharedEventEmitter

getGoogleAuthenticator()

gets google authenticator service

public getGoogleAuthenticator() : PHPGangsta_GoogleAuthenticator
Tags
throws
BasicException
Return values
PHPGangsta_GoogleAuthenticator

getGuzzle()

gets guzzle service

public getGuzzle() : Client
Tags
throws
BasicException
Return values
Client

getIcons()

gets icons service

public getIcons() : Icons
Tags
throws
BasicException
Return values
Icons

getImagine()

gets imagine service

public getImagine() : Imagine
Tags
throws
BasicException
Return values
Imagine

getLog()

gets log object

public getLog() : Logger
Tags
throws
BasicException
Return values
Logger

getName()

gets migration name

public getName() : string
Return values
string

getPdo()

gets PDO object

public getPdo() : PDO
Tags
throws
BasicException
Return values
PDO

getRequest()

gets current request object

public getRequest() : Request
Tags
throws
BasicException
Return values
Request

getRouters()

gets routers

public getRouters() : array<string|int, mixed>
Tags
throws
BasicException
Return values
array<string|int, mixed>

getSchema()

gets schema object

public getSchema() : Schema
Tags
throws
BasicException
Return values
Schema

getSesMailer()

gets SES mailer service

public getSesMailer() : SesClient
Tags
throws
BasicException
Return values
SesClient

getSmtpMailer()

gets SMTP mailer service

public getSmtpMailer() : Swift_Mailer
Tags
throws
BasicException
Return values
Swift_Mailer

getTemplates()

gets plates engine object

public getTemplates() : Engine
Tags
throws
BasicException
Return values
Engine

getTranslator()

gets translator

public getTranslator([string|null $locale_code = null ]) : Translator
Parameters
$locale_code : string|null = null
Tags
throws
DependencyException
throws
NotFoundException
Return values
Translator

requestUrl()

executes an http request

public requestUrl(string $url[, string $method = 'GET' ][, array<string|int, mixed> $options = [] ]) : string|bool
Parameters
$url : string
$method : string = 'GET'
$options : array<string|int, mixed> = []
Tags
throws
Exception
throws
GuzzleException
Return values
string|bool

up()

do the migration

public up() : void
Tags
throws
BasicException
throws
Exception

getService()

gets registered service

protected getService(string $service_key) : mixed
Parameters
$service_key : string
Tags
throws
BasicException

addBlock()

adds a block model

private addBlock(string $title, string $content, string $region[, string $locale = 'en' ][, array<string|int, mixed> $rewrites = [] ]) : Block
Parameters
$title : string
$content : string
$region : string
$locale : string = 'en'
$rewrites : array<string|int, mixed> = []
Tags
throws
BasicException
Return values
Block

addContactForm()

adds a contact form model

private addContactForm(string $title, string $content[, string $locale = 'en' ][, array<string|int, mixed> $fields = [] ][, User|null $owner_model = null ]) : Contact
Parameters
$title : string
$content : string
$locale : string = 'en'
$fields : array<string|int, mixed> = []
$owner_model : User|null = null
Tags
throws
BasicException
Return values
Contact

addEvent()

adds a event model

private addEvent(string $title, string $content, DateTime $date, float $latitude, float $longitude[, string $locale = 'en' ][, User|null $owner_model = null ]) : Event
Parameters
$title : string
$content : string
$date : DateTime
$latitude : float
$longitude : float
$locale : string = 'en'
$owner_model : User|null = null
Tags
throws
BasicException
Return values
Event

addLinkExchange()

adds a link model

private addLinkExchange(string $url, string $email[, string $locale = 'en' ][, array<string|int, mixed> $terms = [] ][, User|null $owner_model = null ]) : LinkExchange
Parameters
$url : string
$email : string
$locale : string = 'en'
$terms : array<string|int, mixed> = []
$owner_model : User|null = null
Tags
throws
BasicException
Return values
LinkExchange

addMenuItem()

adds a menu item model

private addMenuItem(string $title, string $menu_name, Rewrite $rewrite[, string $locale = 'en' ][, Menu|null $parent = null ]) : Menu
Parameters
$title : string
$menu_name : string
$rewrite : Rewrite
$locale : string = 'en'
$parent : Menu|null = null
Tags
throws
BasicException
Return values
Menu

addNews()

adds a news model

private addNews(string $title, string $content, DateTime $date[, string $locale = 'en' ][, User|null $owner_model = null ]) : News
Parameters
$title : string
$content : string
$date : DateTime
$locale : string = 'en'
$owner_model : User|null = null
Tags
throws
BasicException
Return values
News

addPage()

adds a page model

private addPage(string $title, string $content[, string $locale = 'en' ][, array<string|int, mixed> $terms = [] ][, User|null $owner_model = null ][, array<string|int, mixed> $images = [] ]) : Page
Parameters
$title : string
$content : string
$locale : string = 'en'
$terms : array<string|int, mixed> = []
$owner_model : User|null = null
$images : array<string|int, mixed> = []
Tags
throws
BasicException
Return values
Page

addTerm()

adds a term model

private addTerm(string $title, string $content[, string $locale = 'en' ][, User|null $owner_model = null ]) : Taxonomy
Parameters
$title : string
$content : string
$locale : string = 'en'
$owner_model : User|null = null
Tags
throws
BasicException
Return values
Taxonomy

createImage()

generates an image

private createImage([int $w = 400 ][, int $h = 400 ]) : MediaElement
Parameters
$w : int = 400
$h : int = 400
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
Return values
MediaElement

        
On this page

Search results