当前位置: 首页>>代码示例>>PHP>>正文


PHP Location::__construct方法代码示例

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


在下文中一共展示了Location::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @param string $location     * @param string $caption
  * @param string $title
  * @param string $license
  */
 public function __construct($location, $caption = null, $title = null, $license = null)
 {
     parent::__construct($location);
     $this->caption = $caption;
     $this->title = $title;
     $this->license = $license;
 }
开发者ID:marcelomx,项目名称:sitemapper,代码行数:12,代码来源:Image.php

示例2: __construct

 /**
  * @param string $location
  * @param string $lastModification
  * @param string $changeFrequency
  * @param float  $priority
  * @param array  $images
  */
 public function __construct($location, $lastModification = null, $changeFrequency = null, $priority = null, $images = array())
 {
     parent::__construct($location, $lastModification);
     $this->changeFrequency = $changeFrequency;
     $this->priority = $priority;
     $this->setImages($images);
 }
开发者ID:marcelomx,项目名称:sitemapper,代码行数:14,代码来源:Url.php

示例3: __construct

 public function __construct(Location $parent)
 {
     $id = Locations::MakeID('Neutral zone secret room');
     parent::__construct($id, new Position(1085, -1990), new Position(1130, -2005), 15, new Position(1115.8734, -2022.8872, 69.0078, 274.9148), $parent, -1, 0, 0);
     parent::AddEntrance(-1, 'main', new Position(1120.3972, -2051.2332, 69.0078, 180));
     parent::LoadObjectsFromFile('neutralzone_secret.txt');
 }
开发者ID:ryden,项目名称:ItalyMafia-3.0,代码行数:7,代码来源:neutralzone.php

示例4: __construct

 public function __construct()
 {
     $id = Locations::MakeID('Hitman_HQ');
     $location0 = Locations::Find(0);
     parent::__construct($id, new Position(1950, 170), new Position(1780, 340), 85, new Position(202.142, 1869.3627, 13.1406, 280), $location0, -1, 0, $id);
     $this->LoadObjectsFromFile('hitman_hq.txt');
     parent::AddEntrance(-1, 'main', new Position(2263.5876, -755.4053, 38.0447, 120.0885));
 }
开发者ID:ryden,项目名称:ItalyMafia-3.0,代码行数:8,代码来源:hitman_hq.php

示例5: __construct

 public function __construct()
 {
     LSBank::$id = Locations::MakeID('Los Santos Bank');
     $location0 = Locations::Find(0);
     parent::__construct(LSBank::$id, new Position(2300, 15), new Position(2340, -25), 40, new Position(2306.1182, -16.238, 26.7496, 281.6266), $location0, -1, 0, LSBank::$id);
     parent::AddEntrance(1274, 'main', new Position(1462.21, -1013.2396, 26.8438, 178.2465));
     /* ID=1274 Dollar icon ($) */
     parent::AddEntrance(1274, 'back', new Position(1426.8937, -966.2885, 37.4297, 349.1802), new Position(2315.2346, -1.3617, 26.7422, 180.4423));
 }
开发者ID:ryden,项目名称:ItalyMafia-3.0,代码行数:9,代码来源:bank.php

示例6: __construct

 public function __construct()
 {
     $id = Locations::MakeID('Police_Department');
     $location0 = Locations::Find(0);
     parent::__construct($id, new Position(200, 130), new Position(290, 100), 30, new Position(246.3663, 108.5394, 1003.2188, 0), $location0, -1, 10, $id);
     $this->AddEntrance(1239, 'street', new Position(1554.2861, -1675.6412, 16, 90));
     $this->AddEntrance(1239, 'parking', new Position(1568.6268, -1691.0177, 5.8906, 180), new Position(214.8052, 118.2134, 1003.2188, 90));
     $this->AddEntrance(1239, 'roof', new Position(1564.9879, -1685.7429, 28.3956, 180), new Position(237.9606, 114.7937, 1010.2188, 90));
 }
开发者ID:ryden,项目名称:ItalyMafia-3.0,代码行数:9,代码来源:Police_Department.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     //check login
     /* if($this->session->userdata('logged_in') != TRUE){
            redirect('auth/login');
        }*/
     //load model
     $this->load->model('m_sell', 'sell');
 }
开发者ID:TeerasakGame,项目名称:natkaset,代码行数:10,代码来源:Sell.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     if ($this->session->userdata('logged_in') != TRUE) {
         redirect('auth/login');
     }
     //load model
     $this->load->model('M_manage', 'manage');
     $this->load->model('M_sell', 'sell');
 }
开发者ID:TeerasakGame,项目名称:natkaset,代码行数:10,代码来源:Manage.php

示例9:

 function __construct($location)
 {
     parent::__construct(realpath($location));
     if (empty($location)) {
         throw new \InvalidArgumentException("No path was given");
     }
     if (!$this->isValid()) {
         throw new \InvalidArgumentException("Not a Valid path or doesn't exist");
     }
     $this->setInformation();
 }
开发者ID:gpcrocker,项目名称:ZendDirectoryInfo,代码行数:11,代码来源:File.php

示例10:

 /**
  * URL constructor.
  * Performs validation
  * @param $location string
  */
 function __construct($location)
 {
     parent::__construct($location);
     if (empty($location)) {
         throw new \InvalidArgumentException("No URL was given");
     }
     if (!$this->isValid()) {
         throw new \InvalidArgumentException("Not a Valid URL");
     }
     $this->setInformation();
 }
开发者ID:gpcrocker,项目名称:ZendDirectoryInfo,代码行数:16,代码来源:URL.php

示例11: __construct

 public function __construct($ID, $db)
 {
     parent::__construct($ID, $db);
     $this->information = (object) array();
     $sql = $db->query('SELECT email, website, twitter FROM user WHERE id=' . $ID . ' LIMIT 1');
     while ($row = $sql->fetch_object()) {
         $this->information->email = $row->email;
         $this->information->web = $row->website;
         $this->information->twitter = '@<a href="http://twitter.com/' . $row->twitter . '">' . $row->twitter . '</a>';
     }
     $this->information->statement = $this->thing;
 }
开发者ID:neomelonas,项目名称:ResumeLibrary,代码行数:12,代码来源:User.php

示例12: __construct

 /**
  *
  * @param int $ID
  * @param mysqli $db The database connection. Mysqli ONLY, 'cause.
  */
 public function __construct($ID, $db)
 {
     parent::__construct($ID, $db);
     $sql = $db->query('SELECT start, end FROM names n INNER JOIN user_pro up ON up.pro_id=n.id WHERE up.user_id=' . $ID . ' ORDER BY `end`');
     /* @var $start DateTime */
     /* @var $end DateTime */
     while ($row = $sql->fetch_object()) {
         $start = $row->start;
         $end = $row->end;
     }
     $start = $start == null ? null : date("F, Y", strtotime($start));
     $end = $end == null ? 'Present' : date("F, Y", strtotime($end));
     $this->timeframe = $start != $end ? $start . ' &#8211; ' . $end : $start;
 }
开发者ID:neomelonas,项目名称:ResumeLibrary,代码行数:19,代码来源:Professional.php

示例13: __construct

 /**
  ** Default constructor
  **
  ** Parameters:
  ** - id:             The unique ID for this house
  ** - name:           The name of this hosue
  ** - maxrooms:       Maximum number of rooms
  ** - default_price:  Default price for unowned rooms, and max price for rooms for sale
  ** - corner1:        Top-Left corner of the location
  ** - corner2:        Bottom-right corner of the location
  ** - edge:           Edge size for the area of this location
  ** - start:          Starting point (default spawn)
  ** - interior:       Interior ID for this location
  **/
 public function __construct($id, $name, $maxrooms, $default_price, Position $corner1, Position $corner2, $edge, Position $start, $interior)
 {
     $location0 = Locations::Find(0);
     $this->id = $id;
     $this->name = $name;
     $this->maxrooms = $maxrooms;
     $this->availrooms = 0;
     $this->default_price = $default_price;
     parent::__construct($id, $corner1, $corner2, $edge, $start, $location0, -1, $interior, $id);
     /* Load all rooms from database */
     $rooms = DB::GetHouseRooms($this->id);
     foreach ($rooms as $room) {
         if ($room['number'] >= $this->maxrooms) {
             continue;
         }
         $newroom = new Room($room['id'], $this, $room['number'], $room['fridge'], new Ownership($room['owner'], $room['fowner']));
         if ($room['owner'] == null && $room['fowner'] == null) {
             /* If both owner and fowner are null, this is an unsold room */
             $newroom->SetAvailable(true);
             $newroom->SetPrice($this->default_price);
             $this->availrooms++;
         } else {
             $newroom->SetPrice($room['price']);
             if ($room['price'] != -1) {
                 /* If price isnt -1, the owner put it for sale */
                 $newroom->SetAvailable(true);
                 $this->availrooms++;
             }
             if ($room['owner'] != null) {
                 $this->prooms[$room['owner']] = $newroom;
             }
             if ($room['fowner'] != null) {
                 $this->frooms[$room['fowner']] = $newroom;
             }
         }
         $this->rooms[$newroom->Number()] = $newroom;
         /* Update the cheapest room on this building */
         if ($newroom->IsAvailable() && ($this->cheapest == null || $this->cheapest->GetPrice() > $newroom->GetPrice())) {
             $this->cheapest = $newroom;
         }
         $newroom->SetChanged(false);
     }
 }
开发者ID:ryden,项目名称:ItalyMafia-3.0,代码行数:57,代码来源:house.php

示例14: __construct

 public function __construct($name = null)
 {
     parent::__construct($name);
 }
开发者ID:helpfulrobot,项目名称:andrelohmann-silverstripe-geolocation,代码行数:4,代码来源:GeoLocation.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->className = __CLASS__;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:5,代码来源:AvailableLocation.php


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