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


PHP Utility::reverseFind方法代码示例

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


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

示例1: __construct

 /**
  * The constructor for NorthwindEntities accepting service URI
  */
 public function __construct($uri = "")
 {
     if (strlen($uri) == 0) {
         $uri = DEFAULT_ODATA_SERVICE_URL;
     }
     if (Utility::reverseFind($uri, '/') != strlen($uri) - 1) {
         $uri = $uri . '/';
     }
     $this->_baseURI = $uri;
     parent::__construct($this->_baseURI);
     $this->_entities = array("Categories", "CustomerDemographics", "Customers", "Employees", "Order_Details", "Orders", "Products", "Region", "Shippers", "Suppliers", "Territories");
     $this->_entitySet2Type = array("categories" => "Categories", "customerdemographics" => "CustomerDemographics", "customers" => "Customers", "employees" => "Employees", "order_details" => "Order_Details", "orders" => "Orders", "products" => "Products", "region" => "Region", "shippers" => "Shippers", "suppliers" => "Suppliers", "territories" => "Territories");
     $this->_entityType2Set = array("categories" => "Categories", "customerdemographics" => "CustomerDemographics", "customers" => "Customers", "employees" => "Employees", "order_details" => "Order_Details", "orders" => "Orders", "products" => "Products", "region" => "Region", "shippers" => "Shippers", "suppliers" => "Suppliers", "territories" => "Territories");
     $this->_association = array("FK_Products_Categories" => array("Categories" => "0..1", "Products" => "*"), "FK_Orders_Customers" => array("Customers" => "0..1", "Orders" => "*"), "FK_Employees_Employees" => array("Employees" => "0..1", "Employees1" => "*"), "FK_Orders_Employees" => array("Employees" => "0..1", "Orders" => "*"), "FK_Order_Details_Orders" => array("Orders" => "1", "Order_Details" => "*"), "FK_Order_Details_Products" => array("Products" => "1", "Order_Details" => "*"), "FK_Orders_Shippers" => array("Shippers" => "0..1", "Orders" => "*"), "FK_Products_Suppliers" => array("Suppliers" => "0..1", "Products" => "*"), "FK_Territories_Region" => array("Region" => "1", "Territories" => "*"), "CustomerCustomerDemo" => array("CustomerDemographics" => "*", "Customers" => "*"), "EmployeeTerritories" => array("Employees" => "*", "Territories" => "*"));
     $this->_Categories = new DataServiceQuery('/' . 'Categories', $this);
     $this->_CustomerDemographics = new DataServiceQuery('/' . 'CustomerDemographics', $this);
     $this->_Customers = new DataServiceQuery('/' . 'Customers', $this);
     $this->_Employees = new DataServiceQuery('/' . 'Employees', $this);
     $this->_Order_Details = new DataServiceQuery('/' . 'Order_Details', $this);
     $this->_Orders = new DataServiceQuery('/' . 'Orders', $this);
     $this->_Products = new DataServiceQuery('/' . 'Products', $this);
     $this->_Region = new DataServiceQuery('/' . 'Region', $this);
     $this->_Shippers = new DataServiceQuery('/' . 'Shippers', $this);
     $this->_Suppliers = new DataServiceQuery('/' . 'Suppliers', $this);
     $this->_Territories = new DataServiceQuery('/' . 'Territories', $this);
 }
开发者ID:zzzaaa,项目名称:odataphp,代码行数:29,代码来源:NorthwindEntities.php

示例2: displayAddLink

 /**
  * Function to display addlink button, and to
  * generate form to handle addlink.
  * @param string $type The entitiy name.
  * @param string $attachedTo The navigation path
  */
 public function displayAddLink($type, $attachedTo = '')
 {
     $pagingAllowed = null;
     if ($this->_enablePaging && isset($_REQUEST['pagingAllowed'])) {
         $pagingAllowed = "<input type=\"hidden\" name=\"pagingAllowed\" value=\"" . $_REQUEST['pagingAllowed'] . "\">";
     }
     $skip = null;
     if (isset($_REQUEST['skip'])) {
         $skip = "<input type=\"hidden\" name=\"skip\" value=\"" . $_REQUEST['skip'] . "\">";
     }
     echo $attachedTo . "<br>";
     $pos = Utility::reverseFind($attachedTo, '/');
     if ($pos != FALSE) {
         $attachedTo = substr($attachedTo, 0, $pos);
     }
     $object = $this->getObject($type);
     echo "<table style=\"border: thin solid #C0C0C0;\" border=\"1\">";
     echo "<form action=\"" . $this->_containerScriptName . "?query=" . $this->_query . "&serviceUri=" . $this->_uri . "&Type=" . $type . "&AttachQuery=" . $attachedTo . "\" method=\"post\">" . $pagingAllowed . $skip;
     echo "<tr align=\"center\" style=\"font-family: Calibri; " . "background-color: #97CC00\">" . "<td Colspan =\"2\">" . get_class($object) . "</td></tr>";
     echo "<tr style=\"font-family: Calibri; " . "background-color: #99CCFF\">" . "<td>Field</td>" . "<td>Value</td></tr>";
     foreach ($object->getEntityKeys() as $key) {
         echo "<tr style=\"font-family: Calibri; " . "background-color: #CCFFFF\">";
         echo "<td style=\"width=175pt\">" . $key . "*</td>";
         echo "<td ><input size = \"125\" name=\"" . $key . "\" type=\"text\" /></td>";
         echo "</tr>";
     }
     echo "<tr>";
     echo "<td colspan=\"2\" style=\"width=70\"><input id=\"btnAddLink\"" . " type=\"submit\" name=\"btnAddLink\" value=\"Save\"/></td>";
     echo "</tr>";
     echo "</form>";
     echo "</table>";
 }
开发者ID:zzzaaa,项目名称:odataphp,代码行数:38,代码来源:WCFDataServicesEntity.php

示例3: __construct

 /**
  * The constructor for VideoGameStoreEntities accepting service URI
  */
 public function __construct($uri = "")
 {
     if (strlen($uri) == 0) {
         $uri = DEFAULT_ODATA_SERVICE_URL;
     }
     if (Utility::reverseFind($uri, '/') != strlen($uri) - 1) {
         $uri = $uri . '/';
     }
     $this->_baseURI = $uri;
     parent::__construct($this->_baseURI);
     $this->_entities = array("Accessory", "Console", "Customer", "Game", "Product", "ProductType", "Purchase", "PurchaseItem", "Supplier", "sysdiagrams");
     $this->_entitySet2Type = array("accessory" => "Accessory", "console" => "Console", "customer" => "Customer", "game" => "Game", "product" => "Product", "producttype" => "ProductType", "purchase" => "Purchase", "purchaseitem" => "PurchaseItem", "supplier" => "Supplier", "sysdiagrams" => "sysdiagrams");
     $this->_entityType2Set = array("accessory" => "Accessory", "console" => "Console", "customer" => "Customer", "game" => "Game", "product" => "Product", "producttype" => "ProductType", "purchase" => "Purchase", "purchaseitem" => "PurchaseItem", "supplier" => "Supplier", "sysdiagrams" => "sysdiagrams");
     $this->_association = array("FK_Accessory_Product" => array("Product" => "1", "Accessory" => "0..1"), "FK_Console_Product" => array("Product" => "1", "Console" => "0..1"), "FK_Purchase_Customer" => array("Customer" => "1", "Purchase" => "*"), "FK_Game_Product" => array("Product" => "1", "Game" => "0..1"), "FK_Product_ProductType" => array("ProductType" => "1", "Product" => "*"), "FK_Product_Supplier" => array("Supplier" => "0..1", "Product" => "*"), "FK_PurchaseItem_Product" => array("Product" => "1", "PurchaseItem" => "*"), "FK_PurchaseItem_Purchase" => array("Purchase" => "1", "PurchaseItem" => "*"));
     $this->_Accessory = new DataServiceQuery('/' . 'Accessory', $this);
     $this->_Console = new DataServiceQuery('/' . 'Console', $this);
     $this->_Customer = new DataServiceQuery('/' . 'Customer', $this);
     $this->_Game = new DataServiceQuery('/' . 'Game', $this);
     $this->_Product = new DataServiceQuery('/' . 'Product', $this);
     $this->_ProductType = new DataServiceQuery('/' . 'ProductType', $this);
     $this->_Purchase = new DataServiceQuery('/' . 'Purchase', $this);
     $this->_PurchaseItem = new DataServiceQuery('/' . 'PurchaseItem', $this);
     $this->_Supplier = new DataServiceQuery('/' . 'Supplier', $this);
     $this->_sysdiagrams = new DataServiceQuery('/' . 'sysdiagrams', $this);
 }
开发者ID:zzzaaa,项目名称:odataphp,代码行数:28,代码来源:VideoGameStoreEntities.php

示例4: GetRelatedLinks

 protected function GetRelatedLinks($links)
 {
     $relLinks = array();
     foreach ($links as $link) {
         $feedNode = $link->getElementsByTagNameNS(self::$namespaces['default'], 'feed');
         if ($feedNode->item(0) === NULL) {
             $relUri = self::GetAttribute($link, "href");
             $index = Utility::reverseFind($relUri, '/');
             $entityName = substr($relUri, $index + 1, strlen($relUri) - $index);
             $relLinks[$entityName] = $relUri;
         }
     }
     return $relLinks;
 }
开发者ID:scottge,项目名称:odataphp,代码行数:14,代码来源:AtomParser.php

示例5: AttachLocation

 /**
  * To update the EditLink and Identity of ResourceBox representing the $entity
  * using $location, Also update the IdentityToResource Dictionary.
  * [Note: Do not call this function from your application, it is used internally]
  *
  * @param EntityObject $entity
  * @param Uri $location
  * @throws InternalError
  */
 public function AttachLocation($entity, $location)
 {
     if (array_key_exists($location, $this->IdentityToResource)) {
         unset($this->IdentityToResource[$location]);
     }
     $resourceBox = null;
     if (!$this->ObjectToResource->TryGetValue($entity, $resourceBox)) {
         throw new InternalError(Resource::AttachLocationFailedDescRetrieval);
     }
     $index = Utility::reverseFind($location, '/');
     $editLink = substr($location, $index + 1, strlen($location) - $index);
     $resourceBox->Identity = $location;
     $resourceBox->EditLink = $editLink;
     $this->IdentityToResource[$location] = $resourceBox;
 }
开发者ID:zzzaaa,项目名称:odataphp,代码行数:24,代码来源:ObjectContext.php

示例6: __construct

 /**
  * The constructor for NetflixCatalog accepting service URI
  */
 public function __construct($uri = "")
 {
     if (strlen($uri) == 0) {
         $uri = DEFAULT_ODATA_SERVICE_URL;
     }
     if (Utility::reverseFind($uri, '/') != strlen($uri) - 1) {
         $uri = $uri . '/';
     }
     $this->_baseURI = $uri;
     parent::__construct($this->_baseURI);
     $this->_entities = array("TitleAudioFormats", "TitleAwards", "Titles", "TitleScreenFormats", "Genres", "Languages", "People");
     $this->_entitySet2Type = array("titleaudioformats" => "TitleAudioFormat", "titleawards" => "TitleAward", "titles" => "Title", "titlescreenformats" => "TitleScreenFormat", "genres" => "Genre", "languages" => "Language", "people" => "Person");
     $this->_entityType2Set = array("titleaudioformat" => "TitleAudioFormats", "titleaward" => "TitleAwards", "title" => "Titles", "titlescreenformat" => "TitleScreenFormats", "genre" => "Genres", "language" => "Languages", "person" => "People");
     $this->_association = array("FK_TitleAudioFormat_Title" => array("Titles" => "1", "TitleAudioFormats" => "*"), "FK_TitleAward_Title" => array("Titles" => "1", "TitleAwards" => "*"), "FK_TitleAward_Person" => array("People" => "0..1", "TitleAwards" => "*"), "FK_Title_Disc" => array("Titles" => "0..1", "Titles1" => "*"), "FK_Title_Movie" => array("Titles" => "0..1", "Titles1" => "*"), "FK_Title_Season" => array("Titles" => "0..1", "Titles1" => "*"), "FK_Title_Series" => array("Titles" => "0..1", "Titles1" => "*"), "FK_TitleScreenFormat_Title" => array("Titles" => "1", "TitleScreenFormats" => "*"), "TitleActors" => array("Titles" => "*", "People" => "*"), "TitleLanguages" => array("Titles" => "*", "Language" => "*"), "TitleDirectors" => array("Titles" => "*", "People" => "*"), "TitleGenres" => array("Titles" => "*", "Genres" => "*"));
     $this->_TitleAudioFormats = new DataServiceQuery('/' . 'TitleAudioFormats', $this);
     $this->_TitleAwards = new DataServiceQuery('/' . 'TitleAwards', $this);
     $this->_Titles = new DataServiceQuery('/' . 'Titles', $this);
     $this->_TitleScreenFormats = new DataServiceQuery('/' . 'TitleScreenFormats', $this);
     $this->_Genres = new DataServiceQuery('/' . 'Genres', $this);
     $this->_Languages = new DataServiceQuery('/' . 'Languages', $this);
     $this->_People = new DataServiceQuery('/' . 'People', $this);
 }
开发者ID:zzzaaa,项目名称:odataphp,代码行数:25,代码来源:netflix.php


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