public function getCompatibleData($haystack, $title, $mode, $script)
    {
        // List of choices order by importance.
        $choices = $this->getChoicesByPriority($title, $mode, $script);

        foreach ($choices as $choice) {
            $data = AssociativeArray::getFromKey($haystack, $choice);

            if (!is_null($data)) {
                return $data;
            }
        }

        return null;
    }
public function getCompatibleData($haystack, $title, $mode, $script)
    {
        // List of choices order by importance.
        $choices = $this->getChoicesByPriority($title, $mode, $script);

        foreach ($choices as $choice) {
            $data = AssociativeArray::getFromKey($haystack, $choice);

            if (!is_null($data)) {
                return $data;
            }
        }

        return null;
    }
public function getCompatibleData ( $ haystack , $ title , $ mode , $ script ) { // List of choices order by importance. $ choices = $ this -> getChoicesByPriority ( $ title , $ mode , $ script ) ; foreach ( $ choices as $ choice ) { $ data = AssociativeArray :: getFromKey ( $ haystack , $ choice ) ; if ( ! is_null ( $ data ) ) { return $ data ; } } return null ; }
Get a compatible data.

@param $haystack
@param $title
@param $mode
@param $script

@return mixed|null
Get a compatible data .