本文整理汇总了PHP中Fox::getAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Fox::getAttributes方法的具体用法?PHP Fox::getAttributes怎么用?PHP Fox::getAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fox
的用法示例。
在下文中一共展示了Fox::getAttributes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: end_sentence
require_once 'animals/ueberdog.php';
require 'animals/cat.inc';
# Dynamic include/require statements like the
# following should be kept untouched, even if
# mergeScripts is on:
$animal = 'fox';
require 'animals/' . $animal . '.php';
$fox = new Fox();
$dog = new Dog();
function end_sentence($end_character)
{
return $end_character;
}
# Collect words:
$words = array();
$words[] = 'The';
if ($fox->getAttributes()) {
$words[] = $fox->getAttributes();
}
$words[] = $fox->getSpecies();
$words[] = Animal::jump();
$words[] = 'over';
$words[] = 'the';
if ($dog->getAttributes()) {
$words[] = $dog->getAttributes();
}
$words[] = $dog->getSpecies();
# Concatenate words and output sentence:
$sentence = false;
include 'build_sentence.php';
echo $sentence, PHP_EOL;