VersionPress\Storages\MetaEntityStorage::splitJoinedKey PHP Method

splitJoinedKey() protected method

Example: Let the key name is "meta_key" and the input is "some-key#1234", then the output is array('meta_key' => 'some-key', 'vp_id' => '1234').
protected splitJoinedKey ( $key ) : array
$key
return array
    protected function splitJoinedKey($key)
    {
        $splittedKey = explode('#', $key, 2);
        return [$this->keyName => $splittedKey[0], 'vp_id' => $splittedKey[1]];
    }

Usage Example

コード例 #1
0
 protected function splitJoinedKey($key)
 {
     $splitKey = parent::splitJoinedKey($key);
     $splitKey[$this->keyName] = $this->maybeReplacePlaceholderWithPrefix($splitKey[$this->keyName]);
     return $splitKey;
 }