本文整理汇总了PHP中A类的典型用法代码示例。如果您正苦于以下问题:PHP A类的具体用法?PHP A怎么用?PHP A使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了A类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createBottomTreeDom
private function createBottomTreeDom()
{
$mainDiv = new Div();
$mainDiv->addStyleClass("bottom_panel");
$div01 = new Div();
$mainDiv->addChild($div01);
$div01->addStyleClasses(["bottom_panel_window"]);
$container = new Div();
$container->addStyleClasses(["bottom_panel_item", "w-31p"]);
$container->updateId("bottom_catalog_tree");
$containerChild = new Div();
$containerChild->addStyleClasses(["catalog"]);
$container->addChild($containerChild);
$div01->addChildList([$container]);
$mainTitle = new A();
$mainTitle->addChild("Каталог");
$mainTitle->addAttribute("href", Labels::$TOP_NAVIGATION_LINKS["catalog"]);
$mainTitle->addStyleClasses(["f-16", "title"]);
$containerChild->addChild($mainTitle);
$treeContainer = new Div();
$treeContainer->addStyleClass("content");
$containerChild->addChild($treeContainer);
$this->treeProcessBottom($this->mainTree, $treeContainer);
return $mainDiv;
}
示例2: foo
function foo()
{
$a = new A();
$a->foo();
$a->bar();
# $a->baz();
}
示例3: foo
function foo()
{
$a = new A();
$a->foo();
$a->field = 123;
$a->foo();
}
示例4: main
function main()
{
$a = new A();
$a->foo = 12;
$a->f();
inOtherUnit(1, 2);
}
示例5: __construct
public function __construct()
{
$str = 'string';
$a = new A();
$str = $a->str();
$this->a = $a->instance();
}
示例6: mainTreeRender
private function mainTreeRender(Tree &$tree, $selectedKey)
{
$li = new Li();
$mainDiv = new Div();
$mainDiv->addStyleClasses(["expand", "text_non_select", "tree_text_node", "input_hover"]);
$table = new Table();
$tr = new Tr();
$nodeIcon = new Td();
$nodeText = new Td();
$nodeText->addStyleClass("tree_text");
$nodeSearchCount = new Td();
$nodeSearchCount->addStyleClass("tree_search_count");
if (count($tree->childrens) > 0) {
$nodeIcon->addStyleClasses(["tree_btn"]);
$icon = new Img();
$icon->addAttribute("style", "top: 2px; position: relative; margin: 0 5px;");
$icon->addAttribute("src", $this->treeLevel <= $this->DEFAULT_TREE_LEVEL_TO_SHOW || $tree->show ? "images/arrow90.png" : "images/arrow00.png");
$nodeIcon->addChild($icon);
} else {
$nodeIcon->addStyleClass("tree_empty");
}
$link = new A();
$link->addAttribute("href", URLBuilder::getCatalogLinkForTree($tree->key));
$link->addChild($tree->value);
$link->addStyleClass("input_hover");
$nodeSelected = new Div();
$nodeSelected->addStyleClass($tree->key == $selectedKey ? 'selected' : 'tree_empty');
$link->addChild($nodeSelected);
$nodeText->addChild($link);
return $li->addChild($mainDiv->addChild($table->addChild($tr->addChildList([$nodeIcon, $nodeText, $nodeSearchCount]))));
}
示例7: bar
function bar()
{
$obj = new A();
$obj->foo();
$obj = new B();
$obj->foo();
}
示例8: f
function f()
{
$a = new A();
for ($i = 0; $i < 1000000; $i++) {
$a->g();
}
}
示例9: bar
function bar()
{
$obj = new A();
$obj->foo(123);
$obj = new B();
$obj->foo(123, 456);
}
示例10: testStubWithMockFailsExpectation
public function testStubWithMockFailsExpectation()
{
$this->stubWithMock('A', function ($test, $mock, $args) {
$mock->expects($test->once())->method('B')->with($test->equalTo('FAILURE'))->will($test->returnValue(7));
}, array(), false);
$x = new A();
$this->assertEquals(7, $x->B('abc'));
}
示例11: getLink
public function getLink($pageNumber, $num)
{
$mainTag = new A();
$mainTag->addStyleClasses(["link_style", "cursor_pointer", "text_non_select", "f-15", "input_hover"]);
$mainTag->addAttribute("href", URLBuilder::getCatalogLinkNumeric($pageNumber, $num));
$mainTag->addChild($pageNumber);
return $mainTag;
}
示例12: test
function test()
{
$a = new A();
echo $a->foo();
$a = new B();
echo $a->foo(555);
echo $a->foo();
}
示例13: getPaginationLinks
public function getPaginationLinks($pageNumber, $num, $totalCount, $topBottom)
{
$mainTag = new Div();
$catalogLink = new CatalogLink();
$dots = false;
$topBottomStyle = $topBottom == 'bottom' ? 'link_next_prev_bottom' : '';
if ($totalCount != 0) {
$amountPages = ceil($totalCount / $num);
if ($pageNumber > 0 && $pageNumber <= $amountPages) {
$mainTag->addStyleClasses(["pagination_bar", "right_top_bar", $topBottomStyle]);
$brokerTag = new Div();
$mainTag->addChild($brokerTag);
$tagCenterContainer = new Span();
if ($pageNumber != 1) {
$tagPrevious = new A();
$tagPrevious->addStyleClasses(["f-16", "text_non_select", "link_style", "link_next_prev", "input_hover", "prev_link"]);
$tagPrevious->addAttribute("href", URLBuilder::getCatalogLinkPrev($pageNumber, $num));
$text = new Div();
$text->addStyleClass("text");
$text->addChild("назад");
$arrow = new Div();
$arrow->addStyleClass("arrow");
$tagCenterContainer->addChild($tagPrevious->addChildList([$arrow, $text]));
}
$brokerTag->addChild($tagCenterContainer);
$tagCenterContainer->addStyleClasses(["numeric_links", "f-15"]);
for ($currentRenderPage = 1; $currentRenderPage <= $amountPages; $currentRenderPage++) {
if ($currentRenderPage < 2 || $currentRenderPage > $pageNumber - $this->linksGroupCount && $currentRenderPage < $pageNumber + $this->linksGroupCount || $currentRenderPage > $amountPages - 1) {
$dots = false;
if ($currentRenderPage != $pageNumber) {
$tagCenterContainer->addChild($catalogLink->getLink($currentRenderPage, $num));
} else {
$emptyLinkView = $catalogLink->getEmptyLink($pageNumber);
$emptyLinkView->addStyleClass("f-16");
$tagCenterContainer->addChild($emptyLinkView);
}
} else {
if (!$dots) {
$dots = true;
$tagCenterContainer->addChild($catalogLink->get3dots());
}
}
}
if ($pageNumber != $amountPages) {
$tagNext = new A();
$tagNext->addStyleClasses(["f-16", "text_non_select", "link_style", "input_hover", "link_next_prev", "next_link"]);
$tagNext->addAttribute("href", URLBuilder::getCatalogLinkNext($pageNumber, $num));
$text = new Div();
$text->addStyleClass("text");
$text->addChild("вперед");
$arrow = new Div();
$arrow->addStyleClass("arrow");
$tagCenterContainer->addChild($tagNext->addChildList([$text, $arrow]));
}
}
}
return $mainTag;
}
示例14: foo
public function foo()
{
$a = new A();
$a->foo();
$b = new Boo();
$b->foo();
$c = new Clo();
$c->foo();
}
示例15: test2ClosureAccess
function test2ClosureAccess()
{
$obj = new A();
$obj->mul1 = function ($a, $b) {
return $a * $b;
};
for ($i = 0; $i < TIMES; $i++) {
assert($obj->mul1(10, 10) === 100);
}
}