PATH:
home
/
centosnipponia
/
public_html
/
appnip
/
vendor
/
fakerphp
/
faker
/
src
/
Faker
/
Provider
<?php namespace Faker\Provider; use Faker\Calculator\Ean; use Faker\Calculator\Isbn; /** * @see http://en.wikipedia.org/wiki/EAN-13 * @see http://en.wikipedia.org/wiki/ISBN */ class Barcode extends Base { private function ean($length = 13) { $code = static::numerify(str_repeat('#', $length - 1)); return $code . Ean::checksum($code); } /** * Utility function for computing EAN checksums * * @deprecated Use \Faker\Calculator\Ean::checksum() instead * * @param string $input * * @return int */ protected static function eanChecksum($input) { return Ean::checksum($input); } /** * ISBN-10 check digit * * @see http://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digits * @deprecated Use \Faker\Calculator\Isbn::checksum() instead * * @param string $input ISBN without check-digit * * @throws \LengthException When wrong input length passed * * @return string */ protected static function isbnChecksum($input) { return Isbn::checksum($input); } /** * Get a random EAN13 barcode. * * @return string * * @example '4006381333931' */ public function ean13() { return $this->ean(13); } /** * Get a random EAN8 barcode. * * @return string * * @example '73513537' */ public function ean8() { return $this->ean(8); } /** * Get a random ISBN-10 code * * @see http://en.wikipedia.org/wiki/International_Standard_Book_Number * * @return string * * @example '4881416324' */ public function isbn10() { $code = static::numerify(str_repeat('#', 9)); return $code . Isbn::checksum($code); } /** * Get a random ISBN-13 code * * @see http://en.wikipedia.org/wiki/International_Standard_Book_Number * * @return string * * @example '9790404436093' */ public function isbn13() { $code = '97' . self::numberBetween(8, 9) . static::numerify(str_repeat('#', 9)); return $code . Ean::checksum($code); } }
[+]
..
[-] Address.php
[edit]
[-] Barcode.php
[edit]
[-] Base.php
[edit]
[-] Biased.php
[edit]
[-] Color.php
[edit]
[-] Company.php
[edit]
[-] DateTime.php
[edit]
[-] File.php
[edit]
[-] HtmlLorem.php
[edit]
[-] Image.php
[edit]
[-] Internet.php
[edit]
[-] Lorem.php
[edit]
[-] Medical.php
[edit]
[-] Miscellaneous.php
[edit]
[-] Payment.php
[edit]
[-] Person.php
[edit]
[-] PhoneNumber.php
[edit]
[-] Text.php
[edit]
[-] UserAgent.php
[edit]
[-] Uuid.php
[edit]
[+]
ar_EG
[+]
ar_JO
[+]
ar_SA
[+]
at_AT
[+]
bg_BG
[+]
bn_BD
[+]
cs_CZ
[+]
da_DK
[+]
de_AT
[+]
de_CH
[+]
de_DE
[+]
el_CY
[+]
el_GR
[+]
en_AU
[+]
en_CA
[+]
en_GB
[+]
en_HK
[+]
en_IN
[+]
en_NG
[+]
en_NZ
[+]
en_PH
[+]
en_SG
[+]
en_UG
[+]
en_US
[+]
en_ZA
[+]
es_AR
[+]
es_ES
[+]
es_PE
[+]
es_VE
[+]
et_EE
[+]
fa_IR
[+]
fi_FI
[+]
fr_BE
[+]
fr_CA
[+]
fr_CH
[+]
fr_FR
[+]
he_IL
[+]
hr_HR
[+]
hu_HU
[+]
hy_AM
[+]
id_ID
[+]
is_IS
[+]
it_CH
[+]
it_IT
[+]
ja_JP
[+]
ka_GE
[+]
kk_KZ
[+]
ko_KR
[+]
lt_LT
[+]
lv_LV
[+]
me_ME
[+]
mn_MN
[+]
ms_MY
[+]
nb_NO
[+]
ne_NP
[+]
nl_BE
[+]
nl_NL
[+]
pl_PL
[+]
pt_BR
[+]
pt_PT
[+]
ro_MD
[+]
ro_RO
[+]
ru_RU
[+]
sk_SK
[+]
sl_SI
[+]
sr_Cyrl_RS
[+]
sr_Latn_RS
[+]
sr_RS
[+]
sv_SE
[+]
th_TH
[+]
tr_TR
[+]
uk_UA
[+]
vi_VN
[+]
zh_CN
[+]
zh_TW
[-] .htaccess.disabled
[edit]