• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP A类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中A的典型用法代码示例。如果您正苦于以下问题:PHP A类的具体用法?PHP A怎么用?PHP A使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了A类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
 }
开发者ID:gingerP,项目名称:shop,代码行数:25,代码来源:BottomPanel.php


示例2: foo

 function foo()
 {
     $a = new A();
     $a->foo();
     $a->bar();
     #    $a->baz();
 }
开发者ID:badlamer,项目名称:hhvm,代码行数:7,代码来源:method2.php


示例3: foo

 function foo()
 {
     $a = new A();
     $a->foo();
     $a->field = 123;
     $a->foo();
 }
开发者ID:badlamer,项目名称:hhvm,代码行数:7,代码来源:properties2.php


示例4: main

function main()
{
    $a = new A();
    $a->foo = 12;
    $a->f();
    inOtherUnit(1, 2);
}
开发者ID:badlamer,项目名称:hhvm,代码行数:7,代码来源:crossUnitRefs.php


示例5: __construct

 public function __construct()
 {
     $str = 'string';
     $a = new A();
     $str = $a->str();
     $this->a = $a->instance();
 }
开发者ID:tmli3b3rm4n,项目名称:phan,代码行数:7,代码来源:0013_assignment_types.php


示例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]))));
 }
开发者ID:gingerP,项目名称:shop,代码行数:31,代码来源:TreeView.php


示例7: bar

function bar()
{
    $obj = new A();
    $obj->foo();
    $obj = new B();
    $obj->foo();
}
开发者ID:badlamer,项目名称:hhvm,代码行数:7,代码来源:76.php


示例8: f

function f()
{
    $a = new A();
    for ($i = 0; $i < 1000000; $i++) {
        $a->g();
    }
}
开发者ID:jemmy655,项目名称:hippyvm,代码行数:7,代码来源:jithip.php


示例9: bar

function bar()
{
    $obj = new A();
    $obj->foo(123);
    $obj = new B();
    $obj->foo(123, 456);
}
开发者ID:badlamer,项目名称:hhvm,代码行数:7,代码来源:78.php


示例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'));
 }
开发者ID:chrismcmacken,项目名称:phptools,代码行数:8,代码来源:failuresTest.php


示例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;
 }
开发者ID:gingerP,项目名称:shop,代码行数:8,代码来源:CatalogLink.php


示例12: test

function test()
{
    $a = new A();
    echo $a->foo();
    $a = new B();
    echo $a->foo(555);
    echo $a->foo();
}
开发者ID:iolevel,项目名称:peachpie,代码行数:8,代码来源:overloading_002.php


示例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;
 }
开发者ID:gingerP,项目名称:shop,代码行数:58,代码来源:CatalogLinks.php


示例14: foo

 public function foo()
 {
     $a = new A();
     $a->foo();
     $b = new Boo();
     $b->foo();
     $c = new Clo();
     $c->foo();
 }
开发者ID:Halleck45,项目名称:DesignPatternDetector,代码行数:9,代码来源:facadebad.php


示例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);
    }
}
开发者ID:camspiers,项目名称:closureaccess,代码行数:10,代码来源:bench.php


示例16: main

function main()
{
    $obja = new A();
    $obja->entry();
    A::static_entry();
    call_user_func('A::foo');
    call_user_func(array('A', 'foo'));
    call_user_func(array($obja, 'foo'));
    // raises warning; no call to __callStatic
    caller();
}
开发者ID:badlamer,项目名称:hhvm,代码行数:11,代码来源:cuf__callStatic1.php


示例17: testObservable

 public function testObservable()
 {
     $a = new A();
     $a->on('Hello', function ($name) {
         echo 'Hello ', $name, "\n";
     });
     $a->on('Hello', function ($name) {
         echo 'Hello again ', $name, "\n";
     });
     ob_start();
     $a->trigger('Hello', 'lloyd');
     $this->assertEquals("Hello lloyd\nHello again lloyd\n", ob_get_clean());
     return $a;
 }
开发者ID:bephp,项目名称:observable,代码行数:14,代码来源:ObservableTest.php


示例18: twitterBadge

function twitterBadge($userEmail, $userPassword, $count = 4)
{
    $json = new Services_JSON();
    // Create the twitter Cacher object to pull feed
    // Password is needed in case feed is protected
    // HTTP Basic Auth hasn't been deprecated...yet...so...lazy wins for now
    $tc = new TwitterCacher($userEmail, $userPassword);
    $tc->setUserAgent("Mozilla/5.0 (compatible; TwitterCacher/1.0; +http://www.kolich.com)");
    //echo '<!-- ' . $tc->getUserTimeline(4) . ' -->';
    //Create a timeline object of the feed (pull from live if old)
    $timeline = $json->decode($tc->getUserTimeline($count));
    if (!$timeline) {
        return '<p>Error locating tweets.</p>';
    }
    // Create unorderer list of tweets (see gagawa module)
    $ul = new Ol();
    foreach ($timeline as $tweet) {
        $text = $tweet->text;
        //Format date as 5 min ago, 2 hours ago, etc.
        $date = distance_of_time_in_words(strtotime($tweet->created_at)) . ' ago';
        // Tweet source, i.e. twhril, tweetie, tweetdeck, etc.
        // $source = $tweet->source;
        // Generate direct link to tweet
        $tweetid = $tweet->id;
        $screenname = $tweet->user->screen_name;
        $tweetlink = 'http://twitter.com/' . $screenname . '/status/' . $tweetid;
        // Turn links into links
        $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\\+.~#?&//=]+)', '<a href="\\1" target="_blank">\\1</a>', $text);
        // Turn twitter @username into links to the users Twitter page
        $text = preg_replace('/(^|\\s)@(\\w+)/', '\\1<a href="http://www.twitter.com/\\2">@\\2</a>', $text);
        // Turn #hashtags into searches
        $text = preg_replace('/(^|\\s)#(\\w+)/', '\\1<a href="http://search.twitter.com/search?q=%23\\2">#\\2</a>', $text);
        // Personal Formatting, see Gagawa for documentaiton.
        // <li>Tweet Text <span>(<a href="linktotweet">some time ago</a>)<span></li>
        $li = new Li();
        $ul->appendChild($li);
        $li->appendChild(new Text($text . ' ('));
        $span = new Span();
        $link = new A();
        $link->setHref($tweetlink);
        $link->appendChild(new Text($date));
        $span->appendChild($link);
        $li->appendChild($span);
        $li->appendChild(new Text(')'));
    }
    //end foreach( $timeline as $tweet )
    // Returns the stack of li's enclosed by ul
    return $ul->write();
}
开发者ID:bobbyearl,项目名称:bobbyearl.github.io,代码行数:49,代码来源:twitter-badge.php


示例19: testSiblings

 public function testSiblings()
 {
     $node = new Node();
     $node->appendChild($a = new A());
     $b = new B($node);
     $node->prependChild($c = new C());
     $node->appendChild($d = new D());
     $a->remove();
     $this->assertSame(null, $c->getPreviousSibling());
     $this->assertSame($b, $c->getNextSibling());
     $this->assertSame(null, $d->getNextSibling());
     $this->assertSame($b, $d->getPreviousSibling());
     $this->assertSame($c, $b->getPreviousSibling());
     $this->assertSame($d, $b->getNextSibling());
 }
开发者ID:talesoft,项目名称:tale-tree,代码行数:15,代码来源:NodeTest.php


示例20: Action

 /**
  * Маршрутизатор действий.
  */
 function Action($action)
 {
     $res = false;
     switch ($action) {
         case "save":
             $res = $this->SavePage();
             break;
         case "fld_add":
             $res = $this->AddField();
             break;
         case "fld_edit":
             $res = $this->EditField();
             break;
         case "fld_del":
             $res = $this->DelField();
             break;
         case "delarch":
             $res = $this->delArch();
             break;
         case "delete":
             $res = $this->Delete();
             break;
     }
     if ($res) {
         A::goUrl("admin.php?mode=sections&item=" . SECTION, array('tab', 'page'));
     }
 }
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:feedback.php



注:本文中的A类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP A2Billing类代码示例发布时间:2022-05-23
下一篇:
PHP zula_redirect函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap