/** * Returns authorized states for an object using the state mapping. * * @return array(<string>) */ public function getAuthorizedStates() { $authorizationMask = $this->graph->getAuthorizationMask($this->object); $objectState = $this->graph->getState($this->readProperty()); $states = array(); foreach ($this->graph->getStates() as $key => $state) { if ($objectState->isAllow($state, $this->graph, $authorizationMask)) { $states[] = $key; } } return $states; }