public static function getByID($akID) { $ak = new static(); $ak->load($akID); if ($ak->getAttributeKeyID() > 0) { return $ak; } }
public static function getByHandle($akHandle) { $ak = CacheLocal::getEntry('collection_attribute_key_by_handle', $akHandle); if (is_object($ak)) { return $ak; } elseif ($ak == -1) { return false; } $ak = new static(); $ak->load($akHandle, 'akHandle'); if ($ak->getAttributeKeyID() < 1) { $ak = -1; } CacheLocal::set('collection_attribute_key_by_handle', $akHandle, $ak); if ($ak === -1) { return false; } return $ak; }