コード例 #1
0
 /**
  * Looks up a member by its unique name.
  *
  * @param string $memberUniqueName Unique name of member
  *
  * @return XMLAMember, or null if not found
  * @throws OLAPException if error occurs
  */
 public function lookupMemberByUniqueName($memberUniqueName)
 {
     $list = new NamedList();
     $this->lookupMemberRelatives(array(XMLATreeOp::getEnum(XMLATreeOp::SELF)), $memberUniqueName, $list);
     switch ($list->size()) {
         case 0:
             return null;
         case 1:
             return $list->get(0);
         default:
             throw new \InvalidArgumentException("more than one member with unique name '" . $memberUniqueName . "'");
     }
 }
コード例 #2
0
 /**
  *
  * @return ResultSet
  */
 public function getMembers($catalog = NULL, $schemaPattern = NULL, $cubeNamePattern = NULL, $dimensionUniqueName = NULL, $hierarchyUniqueName = NULL, $levelUniqueName = NULL, $memberUniqueName = NULL, array $treeOps = array())
 {
     $treeOpString = NULL;
     if (!empty($treeOps)) {
         $op = 0;
         foreach ($treeOps as $treeOp) {
             $to = new XMLATreeOp($treeOp);
             $op |= $to->xmlaOrdinal();
         }
         $treeOpString = '' . $op;
     }
     return $this->getMetadata(new XMLAMetadataRequest(XMLAMetadataRequest::MDSCHEMA_MEMBERS), array("CATALOG_NAME" => $catalog, "SCHEMA_NAME" => $this->wildcard($schemaPattern), "CUBE_NAME" => $this->wildcard($cubeNamePattern), "DIMENSION_UNIQUE_NAME" => $dimensionUniqueName, "HIERARCHY_UNIQUE_NAME" => $hierarchyUniqueName, "LEVEL_UNIQUE_NAME" => $levelUniqueName, "MEMBER_UNIQUE_NAME" => $memberUniqueName, "TREE_OP" => $treeOpString));
 }