Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • Header
  • Item

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Item

Container class for translation properties.

Namespace: Jyxo\Gettext\Parser
Category: Jyxo
Package: Jyxo\Gettext
Subpackage: Parser
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Matěj Humpál
Located at Gettext/Parser/Item.php
Methods summary
public
# __construct( string $chunk )

Constructor.

Constructor.

Retrieves a fragment of the PO file and parses it.

Parameters

$chunk
string
Translation fragment

Throws

Jyxo\Gettext\Parser\Exception
If msgid empty
protected
# parse( array $chunks )

The actual parser.

The actual parser.

Parameters

$chunks
array
Lines of the PO file fragment
public boolean
# isFuzzy( )

Returns whether the msgid is fuzzy.

Returns whether the msgid is fuzzy.

Returns

boolean
public boolean
# isObsolete( )

Returns whether the msgid is obsolete.

Returns whether the msgid is obsolete.

Returns

boolean
public boolean
# hasPlural( )

Returns whether the msgid has plural forms.

Returns whether the msgid has plural forms.

Returns

boolean
public string|array
# getLocation( )

Returns msgid's position in source codes.

Returns msgid's position in source codes.

Returns

string|array
public string|array
# getMsgid( )

Returns msgid.

Returns msgid.

Returns

string|array
public string|array
# getMsgstr( )

Returns msgstr.

Returns msgstr.

Returns

string|array
public string
# getPlural( )

Returns plural translations.

Returns plural translations.

Returns

string
Properties summary
protected string $msgid ''
#

Msgid.

Msgid.

protected string|array $msgstr ''
#

Msgid translations.

Msgid translations.

For each plural form one array field. If there is only one translation (no plural forms), it is stored as a string.

protected string $plural ''
#

Plural forms.

Plural forms.

protected string $location ''
#

Msgid position in the source code.

Msgid position in the source code.

protected boolean $fuzzy false
#

Is msgid fuzzy?

Is msgid fuzzy?

protected boolean $obsolete false
#

Is msgid obsolete?

Is msgid obsolete?

Jyxo PHP Library API documentation generated by ApiGen 2.3.0