Overview

Packages

  • tipy

Classes

  • Tipy
  • TipyApp
  • TipyCli
  • TipyCliSession
  • TipyConfig
  • TipyController
  • TipyCookie
  • TipyDAO
  • TipyEnv
  • TipyFlash
  • TipyInflector
  • TipyInput
  • TipyIOWrapper
  • TipyLogger
  • TipyMailer
  • TipyModel
  • TipyOutput
  • TipyRequest
  • TipySession
  • TipyTestCase
  • TipyTestRunner
  • TipyView

Exceptions

  • AssertionFailedException
  • CompileErrorException
  • CompileWarningException
  • CoreErrorException
  • CoreWarningException
  • DeprecatedException
  • NoMethodException
  • NoticeException
  • ParseException
  • RecoverableErrorException
  • StrictException
  • TipyDaoException
  • TipyException
  • TipyModelException
  • TipyRollbackException
  • TipyValidationException
  • UserDeprecatedException
  • UserErrorException
  • UserNoticeException
  • UserWarningException
  • WarningException
  • Overview
  • Package
  • Class
  • Deprecated
  • Todo

Class TipyInflector

Transforms words from singular to plural, class names to table names, camelCase to snake_case, etc...

Inflect
Extended by TipyInflector
Package: tipy
Located at src/TipyInflector.php
Methods summary
public static string
# underscore( string $str )

Transform string in camelCase to snake_case

Transform string in camelCase to snake_case

Deprecated

Use TipyInflector::snakeCase() instead

Parameters

$str

Returns

string
public static string
# snakeCase( string $str )

Transform string in camelCase to snake_case

Transform string in camelCase to snake_case

Parameters

$str

Returns

string
public static string
# titleCase( string $str )

Transform string in snake_case to TitleCase

Transform string in snake_case to TitleCase

Parameters

$str

Returns

string
public static string
# camelCase( string $str )

Transform string in snake_case to camelCase

Transform string in snake_case to camelCase

Parameters

$str

Returns

string
public static string
# classify( string $str )

Create a model class name from a plural table name.

Create a model class name from a plural table name.

TipyInflector::classify('blog_posts') // => BlogPost

Parameters

$str

Returns

string
public static string
# tableize( string $str )

Create plural table name from a model name.

Create plural table name from a model name.

TipyInflector::tableize('BlogPost') // => blog_posts

Parameters

$str

Returns

string
public static string
# controllerize( string $str )

Create name valid to be a part of controller name from snake_case string. This method does not change plural/singular form of nouns.

Create name valid to be a part of controller name from snake_case string. This method does not change plural/singular form of nouns.

TipyInflector::controllerize('blog_post') // => BlogPost
TipyInflector::controllerize('blog_posts') // => BlogPosts

Parameters

$str

Returns

string
tipy API documentation generated by ApiGen